unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
convert an array to more readable and logical structure === I have an array of around 200 records and it looks like the following: [0] => Array ( [sid] => 54 [sname] => vISL User book [sdate] => 2012-03-01 00:00:00 [pid] => 262 [cid] => 95 [at] => [amount] => 0 [psdate] => 2012-03-14 00:00:00 [first_name] => Alan [last_name] => Darshan [pcid] => 95 [cname] => Invisal ) [1] => Array ( [sid] => 54 [sname] => vISL User book [sdate] => 2012-03-01 00:00:00 [pid] => 263 [cid] => 94 [at] => [amount] => 0 [psdate] => 2012-03-14 00:00:00 [first_name] => umed [last_name] => sarkar [pcid] => 92 [cname] => Tisal ) I want to convert this array to the following format. The reason is that sid, sname and sdate combination could have multiple values of pid, cid ... cname: [0] => Array ( [sid] => 54 [sname] => vISL User book [sdate] => 2012-03-01 00:00:00 [parr] => Array ( [0] => Array ( [pid] => 262 [cid] => 95 [at] => [amount] => 0 [psdate] => 2012-03-14 00:00:00 [first_name] => Alan [last_name] => Darshan [pcid] => 95 [cname] => Invisal ) [1] => Array ( [pid] => 262 [cid] => 95 [at] => [amount] => 0 [psdate] => 2012-03-14 00:00:00 [first_name] => Alan [last_name] => Darshan [pcid] => 95 [cname] => Invisal ) ) ) [1] => Array ( [sid] => 53 [sname] => tebby book [sdate] => 2012-04-01 00:00:00 [parr] => Array ( [0] => Array ( [pid] => 162 [cid] => 15 [at] => [amount] => 1 [psdate] => 2012-03-14 00:00:00 [first_name] => edbey [last_name] => balh [pcid] => 93 [cname] => Ansasa ) [1] => Array ( [pid] => 212 [cid] => 92 [at] => [amount] => 0 [psdate] => 2012-03-14 00:00:00 [first_name] => xyz [last_name] => def [pcid] => 91 [cname] => vsall ) ) ) What would be the best way to get the required structure of the array?
0
[ 2, 8406, 40, 7718, 20, 91, 1302, 579, 17, 11545, 1411, 800, 3726, 3726, 31, 57, 40, 7718, 16, 140, 2327, 742, 17, 32, 1879, 101, 14, 249, 45, 636, 387, 500, 800, 1, 7718, 13, 5, 636, 18, 1340, 500, 800, 1, 5896, 636, 18, 725...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I determine Network IP, Gateway and Broadcast IP from IP address and Subnet? === I have an IP address 10.1.0.4 and subnet 129 How can I determine Network IP, Gateway and Broadcast IP? Please help...its urgent
2
[ 2, 184, 92, 31, 3746, 982, 15735, 15, 12171, 17, 1992, 15735, 37, 15735, 3218, 17, 972, 2328, 60, 800, 3726, 3726, 31, 57, 40, 15735, 3218, 332, 9, 165, 9, 387, 9, 300, 17, 972, 2328, 13, 13320, 184, 92, 31, 3746, 982, 15735, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
joomla multiple site component upgrade === I manage multiple joomla sites across several linux servers that my company owns. The Joomla's use specific core components that I install and update. I am wondering if anybody knows of a way to update the same components on mulitple sites at the same time. Or if someone could point me in the direction of creating a script that will scp the files up and perform the upgrade. Thanks!
0
[ 2, 2640, 2636, 531, 1886, 689, 5912, 9483, 800, 3726, 3726, 31, 4705, 1886, 2640, 2636, 531, 3259, 464, 238, 13024, 17595, 30, 51, 237, 258, 18, 9, 14, 2640, 2636, 531, 22, 18, 275, 1903, 2884, 5090, 30, 31, 16146, 17, 11100, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
python parsing : String Comparison issue === for line in f.readlines(): if( line == "Open Ended Schemes(Balanced)") : print "found" My data text is Mutual fund information given by link below: http://www.amfiindia.com/spages/NAV0.txt When I find the 'Open Ended Schemes', I wish to execute some code. The problem is dat == operator doesn't work here. I tried some combinations with line.rsplit() but Couldn't succeed I am a beginner with python
0
[ 2, 20059, 2017, 18, 68, 13, 45, 3724, 6050, 1513, 800, 3726, 3726, 26, 293, 19, 398, 9, 10647, 7939, 5, 6, 45, 100, 5, 293, 800, 3726, 13, 7, 10157, 1272, 13185, 5, 24140, 43, 6, 7, 6, 13, 45, 4793, 13, 7, 12235, 7, 51, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The mystory of the silent string (Server recieving null string from Android Client) === Im trying to get my android to talk to my computer and I've almost got it, i can send strings over the internet to my computer and all but there's just one problem, when my computer reads the strings they're null!!! I can figure it out :( Heres the code for the client public class ClientActivity extends Activity implements View.OnClickListener{ EditText ip1,ip2,ip3,ip4, message, port; TextView con; Button send; InetAddress inet; Socket s; OutputStream out; PrintWriter output; int sip; int rport; byte[] ip; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ip1 = (EditText) findViewById(R.id.etIP1); ip2 = (EditText) findViewById(R.id.etIP2); ip3 = (EditText) findViewById(R.id.etIP3); ip4 = (EditText) findViewById(R.id.etIP4); port = (EditText) findViewById(R.id.etPort); message = (EditText) findViewById(R.id.etMessage); send = (Button) findViewById(R.id.bSend); con = (TextView) findViewById(R.id.tvCon); ip = new byte[4]; send.setOnClickListener(this); } @Override public void onClick(View arg0) { switch(arg0.getId()){ case R.id.bSend: try{ rport = Integer.parseInt(port.getText().toString()); } catch (NumberFormatException e){ con.setText(e.toString()); break; } try{ sip = Integer.parseInt(ip4.getText().toString()); sip = (sip << 8) + Integer.parseInt(ip3.getText().toString()); sip = (sip << 8) + Integer.parseInt(ip2.getText().toString()); sip = (sip << 8) + Integer.parseInt(ip1.getText().toString()); } catch (NumberFormatException e){ con.setText(e.toString()); break; } ip[0] = (byte)(0xff & sip); ip[1] = (byte)(0xff & (sip >> 8)); ip[2] = (byte)(0xff & (sip >> 16)); ip[3] = (byte)(0xff & (sip >> 24)); try { inet = InetAddress.getByAddress(ip); s = new Socket(inet, rport); out = s.getOutputStream(); output = new PrintWriter(out); output.println(message.getText().toString()); con.setText("Message Sent"); s.close(); } catch (UnknownHostException e) { con.setText(e.toString()); } catch (IOException e) { con.setText(e.toString()); } break; } } } And here's the code for the Server: public class Main { public static void main(String[] args) { try { Boolean end = false; ServerSocket ss = new ServerSocket(4331); while(!end){ //Server is waiting for client here, if needed Socket s = ss.accept(); BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream())); PrintWriter output = new PrintWriter(s.getOutputStream(),true); //Autoflush String st = input.readLine(); System.out.println(""+st); s.close(); } ss.close(); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Any help at all would be appreciated, thanks :)
0
[ 2, 14, 51, 4416, 16, 14, 2690, 3724, 13, 5, 10321, 106, 13, 15110, 2443, 68, 16203, 3724, 37, 13005, 6819, 6, 800, 3726, 3726, 797, 749, 20, 164, 51, 13005, 20, 930, 20, 51, 1428, 17, 31, 22, 195, 557, 330, 32, 15, 31, 92, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hibernate: How to list all mapped objects? === How can I inspect at run time what Hibernate has setup for object mappings? I have a mapping that is not generating any errors,it is in the hibernate config, but yet it is not being found. I want to inspect the mappings to verify that it is there and also check for typos.
0
[ 2, 4148, 2102, 8820, 45, 184, 20, 968, 65, 20877, 3916, 60, 800, 3726, 3726, 184, 92, 31, 19, 7350, 35, 485, 85, 98, 4148, 2102, 8820, 63, 18161, 26, 3095, 13305, 18, 60, 31, 57, 21, 13305, 30, 25, 52, 13500, 186, 11908, 15, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WordPress - How do I target child pages based on top-level parent name when writing function to create dynamic classes? === I am creating a custom theme for a client to use with the latest Wordpress release. In this theme, the names of the pages (Contact, About, etc.) are wrapped in div#pageTitle. This div is also assigned a class (such as "aboutTitle"), based on the section of the site. The CSS is written to display an icon next to the name of the page, with a different icon assigned to each class. The intended result is that all pages in a single section of the site should display an icon specifically for that section. (Example: All "About" pages should have one icon, all "Articles" should have a different icon, etc.) In this particular case, there is a top-level page called "About Us". There are a handful of child pages under "About Us". I would like "About Us" and all of it's child pages to display one particular icon, and I would like the class for displaying it dynamically written into the html based on a function written into functions.php. (Naturally, other pages, sections, etc., will have their own associated icon.) I wrote what I *thought* would work, and it does write in the appropriate class... except it writes that class for EVERY SINGLE PAGE IN THE SITE! Can anyone explain what I have done incorrectly, and what corrections to make, to achieve the intended result? The code I have included in functions.php is as follows: // Identify the post title of the parent page function parentPostTitle() { /* is it a page */ if( is_page() ) { global $post; /* Get an array of Ancestors and Parents if they exist */ $parents = get_post_ancestors( $post->ID ); /* Get the top Level page->ID count base 1, array base 0 so -1 */ $id = ($parents) ? $parents[count($parents)-1]: $post->ID; /* Get the parent and set the $parentPostTitle with the page title (post_title) */ $parent = get_page( $id ); $parentPostTitle = $parent->post_title; } } // Enable dynamic PageTitle Classes function dynamicPageTitleClass() { if (is_page("About Us") || ($parentPostTitle="About Us")) { echo ' class="aboutTitle"'; } elseif (is_page("Contact Us")) { echo ' class="contactTitle"'; } elseif (in_category("articles")) { echo ' class="articlesTitle"'; } elseif (in_category("blogs")) { echo ' class="blogTitle"'; } elseif (in_category("videos")) { echo ' class="videosTitle"'; } else { echo ' class=""'; } } Thank you in advance for you time and assistance.
0
[ 2, 833, 5890, 13, 8, 184, 107, 31, 2935, 850, 4434, 432, 27, 371, 8, 3906, 4766, 204, 76, 1174, 1990, 20, 1600, 7782, 2684, 60, 800, 3726, 3726, 31, 589, 2936, 21, 5816, 3184, 26, 21, 6819, 20, 275, 29, 14, 5736, 833, 5890, 83...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to compile MVC3 (razor ) Views including Some java files in Web Project === I want to compile views in my ASP.Net MVC3(razor) Project. I have used this technique http://stackoverflow.com/questions/383192/compile-views-in-asp-net-mvc/542944#542944 Its working fine but problem is that when i do this, an error starts showing: **"The CodeDom provider type "Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located."** When i dig more i found that this error occur when some java files included into project. I have a printers plugin which is made on java(some .jar and other java related file). When i remove these files, everything starts working fine. But problem is that i cant remove these java files from my project because these have an important role in my application. Is there any way that i can compile my Views with including java file into my project? Any suggestion would be highly appreciated.
0
[ 2, 184, 20, 26561, 307, 8990, 240, 13, 5, 13932, 248, 13, 6, 4146, 215, 109, 8247, 6488, 19, 2741, 669, 800, 3726, 3726, 31, 259, 20, 26561, 4146, 19, 51, 28, 306, 9, 2328, 307, 8990, 240, 5, 13932, 248, 6, 669, 9, 31, 57, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS - Why is my UIImageView moving? === Here is my function for which I draw a metronome image within my iOS program. When I load it, the metronome image is loaded, but "flies" down from the top left of the screen to the desired position. This is not the behavior I wanted - I simply want the image to appear at the desired position. Could someone enlighten me why this happens, and how to fix it? Many thanks in advance. Pier. - (void) drawMetronomeForBeat: (int) beatNumber withNumberOfBeats:(int) noBeats { // remove any previous instances first if (metronomeImageView) { [metronomeImageView removeFromSuperview]; } NSString * imageName = @"metronome"; NSString * noBeatsStr = [NSString stringWithFormat:@"%d", noBeats]; NSString * beatNumberStr = [NSString stringWithFormat:@"%d", beatNumber]; imageName = [imageName stringByAppendingString:noBeatsStr]; imageName = [imageName stringByAppendingString:@"b"]; imageName = [imageName stringByAppendingString:beatNumberStr]; UIImage* image = [UIImage imageNamed: imageName]; UIImageView * symbolImageView = [[UIImageView alloc] initWithImage:image]; [symbolImageView setFrame:CGRectMake(410.0f, 215.0f, symbolImageView.frame.size.width, symbolImageView.frame.size.height)]; metronomeImageView = symbolImageView; [self.view addSubview:symbolImageView]; }
0
[ 2, 13, 7760, 13, 8, 483, 25, 51, 13, 5661, 22039, 4725, 1219, 60, 800, 3726, 3726, 235, 25, 51, 1990, 26, 56, 31, 2003, 21, 3986, 251, 790, 1961, 363, 51, 13, 7760, 625, 9, 76, 31, 6305, 32, 15, 14, 3986, 251, 790, 1961, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using enum after getting data from a class === I am a beginner to C# and I am currently experimenting with classes and datastructures when I came upon this problem. I want to use the grade char giving char input to get the int output from the enum description of it. Any help would be welcome. Thanks using System; namespace dataStorageOfFiveStudents { public class StudentData { public string name; public int rollNo; public char grade; public float gpa; } public class Program { enum grading { A=4, B=3, C=2, D=2, F=0}; static void Main(string[] args) { //Data Entry StudentData student1 = new StudentData(); Console.WriteLine("name?"); student1.name = Console.ReadLine(); Console.WriteLine("Roll Number?"); student1.rollNo = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Grade"); student1.grade = Convert.ToChar(Console.ReadLine()); student1.gpa = (int)grading.student1.grade; //Output Console.WriteLine("Name =\t" + student1.name); Console.WriteLine("Roll No =\t" + student1.rollNo); Console.WriteLine("Grade =\t" + student1.grade); Console.WriteLine("GPA =\t" + student1.gpa); Console.ReadKey(); } } }
0
[ 2, 568, 1957, 723, 75, 1017, 1054, 37, 21, 718, 800, 3726, 3726, 31, 589, 21, 26931, 20, 272, 5910, 17, 31, 589, 871, 5737, 68, 29, 2684, 17, 1054, 13971, 18, 76, 31, 281, 685, 48, 1448, 9, 31, 259, 20, 275, 14, 2044, 4892, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Remove deleted items from first level cache in NHibernate? Or: how to check if cached items have been deleted? === We have a brownfield multi-user application (99% Delphi, 1% .net) which uses NHibernate for the persistency of the .net modules. In my application I can add categories to some entity. If I select one and decide to not use it (thus removing the category again) I has been loaded by NHibernate and will stay in the session's first level cache. Now, if some other user deletes this category and I try to save my entity my application throws an exception because the object loaded doesn't exist anymore. my question: is there a way to check if my cache has items loaded which don't exist anymore? and if so, is there a way to remove non-exist entities from my cache? So what happens: I load an entity (added to session cache) I add a category (added to session cache) Someone else deletes the category from the database. I save my entity and the exception occurs because the category doesn't exist anymore. It's still in the session cache. It would be nice if I could (automatically) remove it from my session's cache? is there a way to clean up the cache and remove objects that don't exist anymore? Regards, Ted
0
[ 2, 4681, 19584, 3755, 37, 64, 662, 16522, 19, 12109, 15191, 8820, 60, 54, 45, 184, 20, 2631, 100, 16522, 43, 3755, 57, 74, 19584, 60, 800, 3726, 3726, 95, 57, 21, 886, 1109, 1889, 8, 16704, 3010, 13, 5, 26014, 23030, 15, 13, 233...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IE - "Error: Object doesn't support this action" === I'm getting a frustrating javascript error in IE7 that I can't get around. It is working fine in Chrome and Firefox, but not in IE.. The line I am getting the error in is: `item = listGetAt(list,'1','-');` This is calling the following custom method: function listGetAt(list,position,delimiter) { if(delimiter == null) { delimiter = '-'; } list = list.split(delimiter); if(list.length > position) { return list[position]; } else { return list.length; } } Can anyone see something I can't? Many thanks in advance for any help. Jason
0
[ 2, 13, 660, 13, 8, 13, 7, 29992, 45, 3095, 1437, 22, 38, 555, 48, 1028, 7, 800, 3726, 3726, 31, 22, 79, 1017, 21, 25568, 8247, 8741, 7019, 19, 13, 660, 465, 30, 31, 92, 22, 38, 164, 140, 9, 32, 25, 638, 1123, 19, 13, 12985...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create XML dynamically (java)? === I'm getting a list in java that contains name of variables and their types. I want to generate xsd from this list, but I understand that I have to create xml before. so how do I create xml from list? Thanks, Erez
1
[ 2, 184, 20, 1600, 23504, 7782, 1326, 13, 5, 1004, 1385, 6, 60, 800, 3726, 3726, 31, 22, 79, 1017, 21, 968, 19, 8247, 30, 1588, 204, 16, 12157, 17, 66, 2551, 9, 31, 259, 20, 7920, 993, 18, 43, 37, 48, 968, 15, 47, 31, 1369, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Average query count for expression engine site === I just took over development of an existing EE website and am new to the cms and to blog development as well. First thing I noticed was that the site performed really poorly, so I just started doing some profiling using XDebug. I noticed that the query count is around 550. Is this normal? I know that it all comes down to what kind of queries are being run etc.. but I’m used to much lower numbers using other frameworks, but like I said: I’m new to blog development. TLDR: What is the average ballpark query count for an EE homepage? Thanks!
0
[ 2, 862, 25597, 2468, 26, 1803, 1406, 689, 800, 3726, 3726, 31, 114, 199, 84, 522, 16, 40, 3149, 13, 2851, 2271, 17, 589, 78, 20, 14, 2390, 18, 17, 20, 8146, 522, 28, 134, 9, 64, 584, 31, 2711, 23, 30, 14, 689, 986, 510, 1061...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What safeguards do I need to take if allowing clients to include content within a page on my server? === I've been developing a tool which allows users to login and update publicly-visible content within said tool. The end goal is to allow clients to include this tool, via IFRAME, within their sites. Because of how the tool functions, it would need to occupy the full width & height of the client's page (iframe width=100 & height=100). However, they also need to be able to include their company branding within this tool. In order to dynamically allow their branding within the IFRAME, my plan was to have within the tool URL a variable for template (ie: `<tool URL>?template=<template URL>`). The template would be housed on the client's server and the tool on my end would dynamically GET the HTML from said template and "wrap itself" within the template, using a DIV with predefined ID to hold itself. I plan to limit IFRAMEing to verified clients, but I'm still concerned that allowing the client to include their own content will open some security holes. The only thing I can think of is that the client could include malicious code that would hurt the end-user, but that wouldn't be a threat to my server. Just to review, the intended design, in nested order is: client URL -> IFRAME (src = <tool URL>?template=<template URL>) -> IFRAME content (my tool wrapped in HTML from <template URL>)
0
[ 2, 98, 19861, 18, 107, 31, 376, 20, 247, 100, 2719, 7421, 20, 468, 2331, 363, 21, 2478, 27, 51, 8128, 60, 800, 3726, 3726, 31, 22, 195, 74, 3561, 21, 5607, 56, 2965, 3878, 20, 6738, 108, 17, 11100, 6713, 8, 3762, 3426, 2331, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Connecting to TFSPreview Programmatically === I'm attempting to connect to [TFS Preview][1] from a C# application. At the moment, I'm stuck trying to authenticate. I've added a reference to the TFS 2010 DLLs (I believe that these will enable me to connect, please correct me if I am wrong!) and my test case is as simple as. The URL I am trying to connect to is in the form `https://MYSERVERNAME.tfspreview.com/DefaultCollection` var teamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(workPath, new UICredentialsProvider()); teamProjectCollection.EnsureAuthenticated(); This fails with the following exception. > Team Foundation services are not available from server https://MYSERVER.tfspreview.com/$/defaultcollection. Technical information (for administrator): TF400813: Resource not available for anonymous access. Client authentication required. I had hoped that providing a `UICredentialsProvider` in the factory method creating the team project collection that it'd use this to provide authentication. The TFS Preview service uses Windows Live authentication, but I had hoped that this would be covered. Pointers in the right direction greatly appreciated! [1]: http://tfspreview.com/
0
[ 2, 6440, 20, 13, 11720, 18, 3515, 4725, 625, 6732, 1326, 800, 3726, 3726, 31, 22, 79, 6314, 20, 6379, 20, 636, 11720, 18, 16121, 500, 2558, 165, 500, 37, 21, 272, 5910, 3010, 9, 35, 14, 688, 15, 31, 22, 79, 4549, 749, 20, 1435...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can't get UIImagePickerController to work? === -(void) openPhotoLib:(id)sender { [self dismissModalViewControllerAnimated:YES]; UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; [imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; [imagePicker setDelegate:self]; [self presentModalViewController:imagePicker animated:YES]; NSLog(@"openPhotoLib called"); } Nothing happens except for the NSLog, even though my view controller is a subclass of UINavigationController and UIImagePickerDelegate. Does anyone have any insight or experience with UIImagePickerController?
0
[ 2, 92, 22, 38, 164, 13, 5661, 22039, 16855, 106, 12898, 1252, 20, 170, 60, 800, 3726, 3726, 13, 8, 5, 2625, 1340, 6, 368, 25445, 8326, 45, 5, 1340, 6, 18, 13630, 13, 1, 636, 8411, 14372, 20756, 4725, 12898, 1252, 3443, 79, 1669,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here === I have problem with: > No Hibernate Session bound to thread, and configuration does not allow > creation of non-transactional one here when testing my project. I use Spring 2.0.7(this is must in that project) and Hibernate 3. I have - SessionFactory defined - Transaction manager defined(with session factory injected) - `<tx:annotation-driven transaction-manager="transactionManager"/>` - annotations for transactions switched on I have annotated my tests with: @Test @Transactional and inherited AbstractAnnotationAwareTransactionalTests => I got this error:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here Only way I can overcome it is to use: `TransactionStatus transaction = transactionManager.getTransaction(transactionDefinition);` in test before I call sessionFactory.getCurrentSession().save(myObject); Any suggestions? Or better: how it works? Why it can not create transactional session ? Why no hibernate session is bound ? I have read something about it but it is still not clear to me. I think that I did everything to make it working but obviously it was not sufficient. Thx in advance, Stepik
0
[ 2, 90, 4148, 2102, 8820, 3723, 4138, 20, 9322, 15, 17, 8091, 630, 52, 1655, 2502, 16, 538, 8, 7028, 8645, 192, 53, 235, 800, 3726, 3726, 31, 57, 1448, 29, 45, 13, 1, 90, 4148, 2102, 8820, 3723, 4138, 20, 9322, 15, 17, 8091, 63...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use Groovy 2.0 in netbeans === I want to use groovy 2.0 in Netbeans 7.1.2 because I want to use the static type checking. By default that Netbeans uses the library Groovy 1.6.4 - groovy-all.jar How do I get Netbeans to use Groovy 2.0. I tried to just delete the groovy 1.6.4- groovy-all.jar library and add the groovy2.0-groovy-all.jar. I tried to go to tools -> libraries -> groovy 1.6.4 and replace the jar with the groovy 2.0 jar there. Both result in the same error: The includeAntRuntime=false option is not compatible with fork=false /root/NetBeansProjects/myProject/nbproject/build-impl.xml:606: The following error occurred while executing this line: /root/NetBeansProjects/myProject/nbproject/groovy-build.xml:23: Compilation Failed
0
[ 2, 184, 20, 275, 3452, 2026, 93, 172, 9, 387, 19, 4275, 863, 5950, 800, 3726, 3726, 31, 259, 20, 275, 3452, 2026, 93, 172, 9, 387, 19, 4275, 863, 5950, 453, 9, 165, 9, 135, 185, 31, 259, 20, 275, 14, 12038, 1001, 9886, 9, 34...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why is TextRange.parentElement returning the parent of the FINAL element in my range? === Here is my HTML: <ul contenteditable> <li>Hi there 1</li> <li>HI 2 2 2 2 2</li> <ul><li>hi 3</li></ul> <!-- I know it's invalid, it's what document.execCommand('indent') yields --> <li> hi 4 hi there people 4 here now </li> </ul> (you can see it at http://www.webdevout.net/test?06&raw for the next week) I am attempting to determine whether the currently selected text (in IE8) is within one LI or spans multiple LIs. When I select the entirety of LI's one and two, then enter the following into the console ```document.selection.createRange().parentElement().innerHTML```, the contents of *only the second LI* (HI 2 2 2 2 2 2) is returned. **Why is TextRange.parentElement returning the final element in the range rather than the parent of the entire range?** [The docs](http://msdn.microsoft.com/en-us/library/ie/ms536654(v=vs.85).aspx) say "If the text range spans text in more than one element, this method returns the smallest element that encloses all the elements." My ultimate goal is to determine whether more than one LI is selected; I thought "check if parentElement().nodeName.toUppercase === "LI"" would do it but I can't do this if parentElement() isn't returning the parentElement.
0
[ 2, 483, 25, 1854, 8366, 9, 18908, 27567, 2485, 14, 4766, 16, 14, 426, 4520, 19, 51, 978, 60, 800, 3726, 3726, 235, 25, 51, 13, 15895, 45, 13, 1, 1287, 2331, 69, 242, 579, 1, 13, 1, 1210, 1, 1822, 80, 137, 1, 118, 1210, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C++ igzstream andifstream === one question: In C++, do you know the difference between ifstream and igzstream? Im reading a gzipped file with both, and with ifstream the process is really slower. I wanted to know why. Thanks!!
0
[ 2, 272, 20512, 13, 2816, 380, 11260, 17, 821, 11260, 800, 3726, 3726, 53, 1301, 45, 19, 272, 20512, 15, 107, 42, 143, 14, 2841, 128, 100, 11260, 17, 13, 2816, 380, 11260, 60, 797, 1876, 21, 489, 2553, 3421, 69, 3893, 29, 156, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
keep a form on top of other and stay focussed always === I have form1 and form2 in my DXE2 application. Form2 is shown by Form1. Is it possible for me to keep the form2 always on top and stay focused over Form1?. The main idea is, even if the user clicks on form1, focus should remain on form2 and the form2 should blink to inform the user that the form2 needs to be closed first to make Form1 active. Can I achieve this in Delphi?
0
[ 2, 643, 21, 505, 27, 371, 16, 89, 17, 1179, 1776, 18, 69, 550, 800, 3726, 3726, 31, 57, 505, 165, 17, 505, 135, 19, 51, 13, 43, 13012, 135, 3010, 9, 505, 135, 25, 1721, 34, 505, 165, 9, 25, 32, 938, 26, 55, 20, 643, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to recover file after "git rm abc.c" === I supposed to delete another file.But I deleted a wrong one. How can I recover it after I did "git rm abc.c" Right now, when I issue git status, it says deleted: abc.c BTW, i have other uncommitted changes now. Thank you for your help
0
[ 2, 184, 20, 7635, 3893, 75, 13, 7, 10404, 13, 6538, 5079, 9, 150, 7, 800, 3726, 3726, 31, 2293, 20, 27448, 226, 3893, 9, 811, 31, 19584, 21, 1389, 53, 9, 184, 92, 31, 7635, 32, 75, 31, 144, 13, 7, 10404, 13, 6538, 5079, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
DefaultAxesColorOrder === set(0,'DefaultAxesColorOrder',[1 0 0;0 0 1;1 0 1;0 0 0]); hold('all'); semilogy(Te, iicollfreq(:,P), Te, iecollfreq(:,P), Te, incollfreq(:,P), Te, iTotcollfreq(:,P)) This is my matlab code for plotting 4 separate datasets on the same graph and for some reason it does not plot everything as 4 different colors. If I remove the [0 0 0] at the end I get three perfectly fine, but I cannot get the fourth color to happen. Does anyone know how to plot this correctly?
0
[ 2, 12838, 24926, 18, 11282, 7861, 800, 3726, 3726, 309, 5, 387, 15, 22, 13862, 9708, 24926, 18, 11282, 7861, 22, 15, 2558, 165, 713, 713, 73, 387, 713, 137, 73, 165, 713, 137, 73, 387, 713, 713, 500, 6, 73, 1027, 5, 22, 1233, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Odd "Dependency property field missing" error === ReSharper complains about the following XAML: <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelectionBoxHighlighted" Value="true"/> <Condition Property="IsDropDownOpen" Value="false"/> </MultiTrigger.Conditions> The control template is, of course, for a `ComboBox`. With Solution-wide inspections on, Resharper reports a `Dependency property field missing` error on `IsSelectionBoxHighlighted`, but not on `IsDropDownOpen`. The only difference I can possibly come up with is that `IsSelectionBoxHighlighted` is read-only, but should that make a difference in this instance? Is this a Resharper bug, or is something else going on here? Does this look familiar to anyone?
0
[ 2, 4210, 13, 7, 19038, 8883, 1354, 575, 2863, 7, 7019, 800, 3726, 3726, 302, 23646, 106, 15310, 18, 88, 14, 249, 13, 6791, 8184, 45, 13, 1, 12898, 9577, 6554, 9, 38, 11507, 445, 1, 13, 1, 21531, 3367, 11356, 1, 13, 1, 21531, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
'RequestBodyTooLarge' when trying to upload Blob to Azure Storage via node createBlockBlobFromStream() === When I'm trying to upload 100MB file to Azure Blob storage, using createBlockBlobFromStream() from azure-node-sdk, I receive the following error: error: { code: 'RequestBodyTooLarge', message: 'The request body is too large and exceeds the maximum permissible limit.\nRequestId:6725cfa4-17a1-4024-8fed-f980437d3e8f\nTime:2012-07-30T17:47:00.2841976Z', maxlimit: '67108864' } Any ideas? trying to find information on the net, but no success. Max blob size seems to be 200GB, or 50.000 blocks. I checked constants, block size is set on 4MB which is maximal. SDK bug, or am I missing something?
0
[ 2, 13, 22, 99, 10351, 9760, 8175, 11312, 22, 76, 749, 20, 71, 8294, 334, 10904, 20, 25715, 4326, 1197, 15421, 1600, 12048, 7091, 220, 2665, 11260, 5, 6, 800, 3726, 3726, 76, 31, 22, 79, 749, 20, 71, 8294, 808, 5024, 3893, 20, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I do this with JAXB? === I can't find anything that spells out to me how to do this on the web, or am not following what I do find, so I thought I would ask here. I have an XML message that I want to de-serialize to a Java object. The message is of the format: <billing-amount> <EUR>100</EUR> <GBP>12</GBP> </billing> The snippet comes from a response to an API request on a payment gateway that I am trying to integrate with. Each node within the `<billing-amount>` node represents an an amount of a given currency. `<EUR>` represents Euros, for example. Now if I know all of the possible currencies (well, at least the ones I care about) I can create a Java class that has the following fields within it, one for each possible currency: public class BillingAmount { @XmlElement(name = "EUR") @XmlValue private Integer euroAmount @XmlElement(name = "EUR") @XmlValue private Integer euroAmount ... } And I can then use this new class as follows - making it a field of the actual class that is being created from the XML message: @XmlElement(name = "billing-amount") private BillingAmount billingAmount; The `billingAMount` object, when instantiated, will have one field with the amounts of Euros in it and another with the amount of GBP. Which is all good. But, What I would like to know is, is there a better way of doing this? Is is there a way in JAXB to use the name of the node to add properties to a class you are creating? Or to create a class based upon the name of a node in a list? Essentially what I would like is to create the class based on the name of the node within the list. So the `BillingAcount` class could maybe be replaced with an `XmlElementWrapper` as it seems an overhead to create a class just to act as a container. Thanks.
0
[ 2, 184, 107, 31, 107, 48, 29, 11712, 220, 60, 800, 3726, 3726, 31, 92, 22, 38, 477, 602, 30, 12844, 70, 20, 55, 184, 20, 107, 48, 27, 14, 2741, 15, 54, 589, 52, 249, 98, 31, 107, 477, 15, 86, 31, 289, 31, 83, 1349, 235, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Allow users to do anything within his own schema but cannot create or drop the schema itself === I have created a schema in SQL Azure using following permissions on my database role: CREATE ROLE myrole AUTHORIZATION dbo; EXEC sp_addrolemember 'myrole', 'myuser'; CREATE SCHEMA myschema AUTHORIZATION dbo; GRANT ALTER, CONTROL, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::myschema TO myrole; GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO myrole; Through the above defined permissions a user can create/drop his own schema, so to overcome the problem I tried the ALTER ANY SCHEMA permission. But this permission also denies the user to create/drop tables. What permissions are required in order to allow the user to do anything within his own schema but cannot create or drop the schema itself?
2
[ 2, 1655, 3878, 20, 107, 602, 363, 33, 258, 23874, 47, 1967, 1600, 54, 2804, 14, 23874, 1145, 800, 3726, 3726, 31, 57, 679, 21, 23874, 19, 4444, 255, 25715, 568, 249, 5572, 18, 27, 51, 6018, 597, 45, 1600, 597, 51, 661, 413, 2267...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Line intersections for diagonals on a 2d plane in C# === Assume a 2D grid with the top left cell as (0, 0). Pick any two points/coordinates and draw a diagonal and anti-diagonal on each. They may intersect inside or outside the grid. In the picture attached, the red lines are diagonals to the two points (300, 200) and (700, 800). How can I find out the coordinates for the diagonal intersections? Also, how would the formula differ if the slope of the line were negative? I will use this in an algorithm that needs to be highly optimized so the right answer would be the fastest possible way to compute. I'm not sure if this can be done without trignometry. **NOTE:** Please keep in mind that the red lines are a true diagonal/anti-diagonal pair. In other words they are at 45 degree angles to the rectangle. This may or may not help select a more optimized formula than vector calculation. ![enter image description here][1] [1]: http://i.stack.imgur.com/KgXe1.png
0
[ 2, 293, 5351, 18, 26, 16807, 18, 27, 21, 172, 43, 3627, 19, 272, 5910, 800, 3726, 3726, 7158, 21, 172, 43, 7354, 29, 14, 371, 225, 1667, 28, 13, 5, 387, 15, 713, 6, 9, 2036, 186, 81, 819, 118, 716, 23239, 18, 17, 2003, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do create an internal remote repository of all the jars my project uses? === Currently, I'm relying on many external remote repositories, but the requirements for a project that I am working on state that it must be an internal repository. Most of the jars will be identical to the external repositories, and there will be some custom ones as well. How do I do this? I noticed on the Maven website, it says not to rsync:// the whole directory. I don't intend to do that at all, but I would like to grab about 30 jars. If there is a way to quickly copy the ones I want over to my internal repository, will they just work out of the box, or will I have to do anything special?
0
[ 2, 184, 107, 1600, 40, 3117, 5388, 24869, 16, 65, 14, 5112, 18, 51, 669, 2027, 60, 800, 3726, 3726, 871, 15, 31, 22, 79, 21760, 27, 151, 4886, 5388, 302, 14882, 262, 2829, 15, 47, 14, 4786, 26, 21, 669, 30, 31, 589, 638, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JSF 1 nests a new page into my main xhtml === I have a question about JSF 1.2 + Richfaces 3.3. I have a web app which has some navigation rules and some ajax functions. In some point, I want the application make to open a new tab in the browser and show an xhtml page, after doing an action in server side. I have chosen the <h:commandLink> tag for that. That's how it looks: <h:commandLink target="_blank" action="#{sm_gestiondocumental_gestorUserAuditBean.actionCreateUserAuditManager}"> <h:graphicImage value="/images/sm_gestiondocumental/checklist.png" alt="#{wmsg.VIEW_AUDITS}" title="#{wmsg.VIEW_AUDITS}" styleClass="pic" /> </h:commandLink> The code that is executing is the following one: private String createAuditManager(String className, String param, Object objectToAudit, String auditFileName) { AuditManagerBean amb = (AuditManagerBean) FacesUtils .getManagedBean(BeanNames.AUDIT_MANAGER_BEAN); if (amb == null) { amb = new AuditManagerBean(); } try { amb.set_serviceLocator(this.get_serviceLocator()); } catch (Exception e) { e.printStackTrace(); } amb.set_AuditClassName(className); amb.set_AuditId(param); amb.set_AuditList(null); amb.set_AuditFileName(auditFileName); amb.set_ObjectToAudit(objectToAudit); amb.set_AuditFilterInit(this._FilterInit); amb.set_AuditFilterEnd(this._FilterEnd); FacesUtils.setManagedBeanInSession(BeanNames.AUDIT_MANAGER_BEAN, amb); return "showAudits"; } public String actionCreateUserAuditManager() { if (this._SelectedUser == null) { FacesUtils.addErrorMessage("Error al listar usuarios"); return this.createAuditManager(CUsuarioRegistrado.NAME_FOR_AUDIT, "", null, "Auditoría para " + this._SelectedUser); } return this.createAuditManager(CUsuarioRegistrado.NAME_FOR_AUDIT, this._SelectedUser.toString(), null, "Auditoría para " + this._SelectedUser); } Which is returning an "showAudits" String. According to my navigation rules, this String must open this link: auditInfo.xhtml. <navigation-rule> <from-view-id>*</from-view-id> <navigation-case> <description></description> <from-outcome>sm_gestiondocumental_ListGrupoEntrega</from-outcome> <to-view-id>/modules/sm_gestiondocumental/ges_tiposentrega/tiposGrupoList.xhtml</to-view-id> </navigation-case> <navigation-case> <description></description> <from-outcome>sm_gestiondocumental_ListEmpresa</from-outcome> <to-view-id>/modules/sm_gestiondocumental/ges_empresas/empresasList.xhtml</to-view-id> </navigation-case> <navigation-case> <description></description> <from-outcome>sm_gestiondocumental_ListTrabajo</from-outcome> <to-view-id>/modules/sm_gestiondocumental/ges_trabajos/trabajosList.xhtml</to-view-id> </navigation-case> <navigation-case> <description></description> <from-outcome>sm_gestiondocumental_ListSeccion</from-outcome> <to-view-id>/modules/sm_gestiondocumental/ges_secciones/seccionesList.xhtml</to-view-id> </navigation-case> <navigation-case> <description> </description> <from-outcome>showAudits</from-outcome> <to-view-id>/modules/sm_gestiondocumental/auditInfo/auditInfo.xhtml</to-view-id> </navigation-case> </navigation-rule> The rules are well applied, however, the page is opening in the main panel of my application, I mean, a new browser tab is opened but the whole application is being displayed with the auditInfo.xhtml content inside, in order to display only the auditInfo.xhtml page. It seems to be some filtering problem, because the setContent() method of my application bean is called after org.ajax4jsf.Filter invoked. However I don't want that method to be called. Any ideas?
0
[ 2, 487, 18, 410, 137, 5618, 18, 21, 78, 2478, 77, 51, 407, 993, 15895, 800, 3726, 3726, 31, 57, 21, 1301, 88, 487, 18, 410, 137, 9, 135, 2754, 2042, 6413, 18, 203, 9, 240, 9, 31, 57, 21, 2741, 4865, 56, 63, 109, 8368, 1761, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Batch Commit for Lucene Index === I want to index the documents in batches. I am setting the IndexWriterConfig.setMaxBufferedDocs() to set the total number of documents in memory before they are committed back in the index. I want to ask is that, do I have to keep count on the document added and explicitly issue writer.commit() for the index to flush the documents in the memory or the writer will automatically take care of this?
0
[ 2, 13064, 9686, 26, 18515, 556, 4348, 800, 3726, 3726, 31, 259, 20, 4348, 14, 4374, 19, 13064, 160, 9, 31, 589, 2697, 14, 4348, 9657, 14093, 2816, 9, 3554, 8304, 2345, 6866, 69, 13799, 18, 5, 6, 20, 309, 14, 600, 234, 16, 4374, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
config parser python === I have a cfg file which has 10 sections..and each of the section has similar fields. [sec1] id:... [sec2] id.. ... So right now.. I am doing something like.. config_instance = ConfigParser.ConfigParser() id1 = config_instance.get("sec1","id") id2 = config_instance.get("sec2","id") and so on Is there a better more pythonic way to do this.. that it automatically reads all the sections and extracts this feature?? Thanks
0
[ 2, 13, 14093, 2816, 2017, 4104, 20059, 800, 3726, 3726, 31, 57, 21, 10084, 263, 3893, 56, 63, 332, 4501, 9, 9, 290, 206, 16, 14, 1050, 63, 835, 2861, 9, 636, 14332, 165, 500, 4924, 45, 9, 9, 9, 636, 14332, 135, 500, 4924, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wix Installer password protected === I need to make my Wix Installer password protected. How can I do this?. Thanks in advance. Eddy C
4
[ 2, 4807, 396, 16146, 106, 20884, 3803, 800, 3726, 3726, 31, 376, 20, 233, 51, 4807, 396, 16146, 106, 20884, 3803, 9, 184, 92, 31, 107, 48, 60, 9, 3669, 19, 3612, 9, 19106, 272, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Reading PDF Text Images in C# === I need to read the pdf file and need to convert to HTML. Currently I'm using iTextsharp to read PDF. Is there any dll with proper documentation to **read pdf files**. Thanks
0
[ 2, 1876, 13, 11124, 1854, 3502, 19, 272, 5910, 800, 3726, 3726, 31, 376, 20, 1302, 14, 13, 11124, 3893, 17, 376, 20, 8406, 20, 13, 15895, 9, 871, 31, 22, 79, 568, 31, 11969, 23646, 20, 1302, 13, 11124, 9, 25, 80, 186, 13, 43, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
How to use Explode in my case? === I have a variable that contains text with values according to an example below: $data = "5:7|4:1|504:2|1:3" And I would like to achieve results like this: $data[5] = 7; $data[4] = 1; $data[504] = 2; $data[1] = 3; I tried with explode: $data = explode("|", $data); //but it makes $data[0]="5:7"; $data[1]="4:1"; and so on. Should I use explode again? Is it has any sense, or is there another way? I would like to ask for a hint or help.
0
[ 2, 184, 20, 275, 13383, 19, 51, 610, 60, 800, 3726, 3726, 31, 57, 21, 7612, 30, 1588, 1854, 29, 4070, 496, 20, 40, 823, 1021, 45, 5579, 18768, 800, 13, 7, 264, 45, 465, 1, 28379, 1, 25687, 45, 135, 1, 165, 45, 240, 7, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Phonegap camera take a picture === I'm working on adding some mobile app specific functionality to my mobile website. Currently, the app is more or less just a wrapper. public class Activity extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); if (this.isOnline()) { super.loadUrl("http://mysite.com"); } else { super.loadUrl("file:///android_asset/www/offline.html"); } } public boolean isOnline() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = cm.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) { return true; } return false; } } The problem rises with the following javascript. If I replace super.loadUrl("http://mysite.com"); with super.loadUrl("file:///android_asset/www/online.html") and run the following javascript there, it works fine. But if I run it on mysite.com, it keeps on throwing the following exception: 07-13 12:25:12.762: E/Web Console(28251): Not allowed to load local resource: file:///data/data/com.my.app/.Pic.jpg?1342171460960 at null:0 Any thoughts on what I'm doing wrong? var camera = (function(){ var camera = { settings : { quality: 50, } }; var error = function(message) { console.error("Error happened while trying to get a picture", message); }; document.addEventListener("deviceready", function() { camera.settings.destinationType = navigator.camera.DestinationType.FILE_URI; camera.fromPhone = function() { this.settings.sourceType = navigator.camera.PictureSourceType.CAMERA; return this; }; camera.fromLibrary = function() { this.settings.sourceType = navigator.camera.PictureSourceType.PHOTOLIBRARY; return this; }; camera.get = function(callback) { navigator.camera.getPicture(callback, error, camera.settings); }; }, false); return camera; })(); //Later, at a click event camera.fromPhone().get(function(imageURI){ alert("imageURI" + imageURI) $("#largeImage").attr("src", imageURI); });
0
[ 2, 1132, 1136, 306, 3336, 247, 21, 2151, 800, 3726, 3726, 31, 22, 79, 638, 27, 4721, 109, 3241, 4865, 1903, 18548, 20, 51, 3241, 2271, 9, 871, 15, 14, 4865, 25, 91, 54, 787, 114, 21, 28051, 9, 317, 718, 2358, 9073, 744, 6516, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Backbone.js error - Uncaught TypeError: Object [object Object] has no method 'create' === Backbone.js with slim.php - When I adding a new model showing error "Uncaught TypeError: Object [object Object] has no method 'create'". Plz help me to add the new model to database. If I use this.model.save() method it is showing 500 Internal Sever Error. Where to user create() and save() methods. I am not clear about these. Thanks. // Models window.Users = Backbone.Model.extend({ urlRoot:"./bb-api/users", defaults:{ "name":"", "email":"", "designation":"" } }); window.UsersCollection = Backbone.Collection.extend({ model:Users, url:"./bb-api/users" }); // Views window.AddUserView = Backbone.View.extend({ template:_.template($('#new-user-tpl').html()), initialize:function(){ this.model.bind("click", this.render, this); }, render:function(){ $(this.el).html(this.template()); return this; }, events:{ "click .add":"saveUser" }, saveUser:function(){ //alert('saveUser'); this.model.set({ name:$("#name").val(), email:$("#email").val(), designation:$("#designation").val() }); if(this.model.isNew()){ this.model.create(this.model); } } }); // Router var AppRouter = Backbone.Router.extend({ routes:{ "":"welcome", "add":"addUser" }, welcome:function(){ $('#content').html('Welcome to Backbone.js App'); }, addUser:function(){ this.addUserModel = new Users(); this.addUserView = new AddUserView({model:this.addUserModel}); $('#content').html(this.addUserView.render().el); } }); var app = new AppRouter(); Backbone.history.start();
0
[ 2, 24036, 9, 728, 18, 7019, 13, 8, 16061, 12647, 1001, 29992, 45, 3095, 636, 23793, 3095, 500, 63, 90, 2109, 13, 22, 6037, 1373, 22, 800, 3726, 3726, 24036, 9, 728, 18, 29, 8824, 9, 26120, 13, 8, 76, 31, 4721, 21, 78, 1061, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rounded Inner corners with transparent inside frame === I am trying to make a frame from code so that I can apply it to make rounded inner corners with a solid fill outside and transparent inside. ***Just like a solid rectangle with transparent oval inside.*** picture attached. I have tried few shape combinations all that available online displays the corners outside. ![enter image description here][1] The inside should be transparent not white. The image is taken from this [post][2] but the solution presented here is not what I am looking for I dont want to use a 9 patch drawable but would like to be created in code. Please valid answers only. [1]: http://i.stack.imgur.com/UEvOq.png [2]: http://stackoverflow.com/questions/4328166/android-xml-rounded-clipped-corners
0
[ 2, 8472, 3754, 8894, 29, 14862, 572, 3523, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 3523, 37, 1797, 86, 30, 31, 92, 5645, 32, 20, 233, 8472, 3754, 8894, 29, 21, 2941, 3509, 719, 17, 14862, 572, 9, 8980, 2759, 101, 21, 2941, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Deleting a database value after a confirmationscreen - value not deleting === I already posted a likewise question about this yesterday but I ran into a other problem. I made a confirmation screen with the use of javascript, but after pressing "OK" the value isn't deleted. This is my code: <script type="text/javascript"> function confirmation() { var answer = confirm("Weet u zeker dat u deze activiteit wilt verwijderen?"); if (answer){ alert("De activiteit wordt nu verwijderd."); window.location ="roosters_verwijderen.php"; } else{ alert("De activiteit is niet verwijderd."); } } </script> This is the button: <a href="roosters_verwijderen.php?activiteitID='. $row['activiteitID'] .'" onclick="confirmation(); return false"><IMG src="iconen/kruis.png" border="0"></a> The problem here is, that the "activiteitID" isn't sent to the page "roosters_verwijdweren.php" anymore. Can someone help me solve this?
0
[ 2, 121, 1336, 68, 21, 6018, 1923, 75, 21, 15939, 7187, 13, 8, 1923, 52, 121, 1336, 68, 800, 3726, 3726, 31, 614, 6054, 21, 11373, 1301, 88, 48, 7124, 47, 31, 717, 77, 21, 89, 1448, 9, 31, 117, 21, 15939, 2324, 29, 14, 275, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
java execution by inheriting from filr from shared folder === I have two files, one in my local machine and another in a shared folder(from another machine). I've to inherit the class from the file in the shared folder from the file in the local machine as i will be using the functions in it. how can i perform this inheritance? I tried by giving set CLASSPATH=%CLASSPATH%;//(machineNo)/(foldername); but this did not work. what alternative is there to this? Thank you for your help in advance
0
[ 2, 8247, 5769, 34, 17569, 68, 37, 10853, 139, 37, 2592, 19294, 800, 3726, 3726, 31, 57, 81, 6488, 15, 53, 19, 51, 375, 1940, 17, 226, 19, 21, 2592, 19294, 5, 2665, 226, 1940, 6, 9, 31, 22, 195, 20, 17569, 14, 718, 37, 14, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Downloading old version app on android === I have android app, i use phonegap 1.2. To create apk file, i just zip `www` folder, next i pload archive to https://build.phonegap.com/apps/ Than i download apk file from phonegap.com and upload it to https://play.google.com/apps/publish/ Than i saw this message (play.google.com): Warning: Active APKs support fewer devices than previously active APKs. Some users will not receive updates. When I run *Play* on my android phone, there wasn't any updates for my app. So i removed my app and download it once again, nothing has change. I just downloaded the old version. Why do i getting this warning? How can i make it works so users who already download this app could see updates?
0
[ 2, 7121, 68, 315, 615, 4865, 27, 13005, 800, 3726, 3726, 31, 57, 13005, 4865, 15, 31, 275, 1132, 1136, 306, 137, 9, 135, 9, 20, 1600, 21, 17244, 3893, 15, 31, 114, 12133, 13, 1, 6483, 1, 19294, 15, 328, 31, 351, 8294, 9250, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Facebook App Share on fanpage === when im trying to post on my fanpages via my app, it is posting as me and not as the administrator of the page, this is my code: function getPages() { FB.api('/me/accounts', function (resp) { var l=resp.data.length; for (var i = 0, q = resp.data.length; i <q; i++) { var page = resp.data[i]; FB.api(page.id + '/feed', 'post', params, function(response) { if (!response || response.error) { alert('Error occured'); } else { } });
0
[ 2, 9090, 4865, 1891, 27, 2514, 6486, 800, 3726, 3726, 76, 797, 749, 20, 678, 27, 51, 2514, 6486, 18, 1197, 51, 4865, 15, 32, 25, 15669, 28, 55, 17, 52, 28, 14, 8890, 16, 14, 2478, 15, 48, 25, 51, 1797, 45, 1990, 164, 6486, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Want to upload youtube video link on facebook users wall === Hi i am working on an application in which i need to upload a you-tube uploaded video on Facebook using URL or we can say i want to post an URL on Facebook.I have integrated Facebook into my application and i can upload photos on Facebook wall but not able to upload video by URL. Please help me if any one knows
0
[ 2, 259, 20, 71, 8294, 7330, 763, 3508, 27, 9090, 3878, 769, 800, 3726, 3726, 4148, 31, 589, 638, 27, 40, 3010, 19, 56, 31, 376, 20, 71, 8294, 21, 42, 8, 19302, 23782, 763, 27, 9090, 568, 287, 6362, 54, 95, 92, 395, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
wicked form with nested model form in rails 3.0.9 and rvm 1.8.7 === In one module of my project I have used nested form and in that nested form I want to use wicked forms with wicked Reference : Ryan bates http://railscasts.com/episodes/346-wizard-forms-with-wicked?view=asciicast <br> views > notices > _form.html.erb <br/> <%= form_for(@notice) do |f|%> <br/> #notice attributes<br/> <%= f.submit, "Next"><br/> <% end %><br/> I created a notice_step controller and in that controller I have written <br/> class NoticeStepsController < ApplicationController<br> include Wicked::Wizard<br> steps :agendaa<br> def show<br> @notice = Notice.new<br> render_wizard<br> end<br> end<br> and in create action in notice controller <br/> def create<br/> @notice = Notice.new(params[:notice])<br/> if @notice.save <br/> session[:notice_id] = @notice.id <br/> redirect_to notice_steps_path <br/> else <br/> render :new <br/> end <br/> end <br/> notice_step > agenda.html.erb <%= form_for(@notice, url: wizard_path) do |f| %> <br/> < div class="field"><br> <%= f.fields_for :agendas do |builder| %></br> <%= render "notices/agenda_fields", :f => builder %></br> <% end %><br/> <%= link_to_add_fields "Add agenda", f, :agendas %><br/> < /div><br/> <% end %><br/> Nested model is working..... but on clicking on next button it shows me following error<br/> It is giving me SyntaxError in User_steps#show compile error /home/kipl/Desktop/cus_notice/app/views/user_steps/agendaa.html.erb:1: syntax error, unexpected ':', expecting ')' ...ppend= form_for(@notice, url: wizard_path) do |f| @output_b... ^ /home/kipl/Desktop/cus_notice/app/views/user_steps/agendaa.html.erb:10: syntax error, unexpected kENSURE, expecting $end <br/><br/> Any suggestions???
0
[ 2, 9840, 505, 29, 5618, 69, 1061, 505, 19, 2240, 18, 203, 9, 387, 9, 518, 17, 13, 10359, 79, 137, 9, 457, 9, 465, 800, 3726, 3726, 19, 53, 12613, 16, 51, 669, 31, 57, 147, 5618, 69, 505, 17, 19, 30, 5618, 69, 505, 31, 259,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pass data from sqlite listview to new intent? in android === Please can anyone give me the example for this "I have some edit text after doing entry in these user will click on save button then show a listview with first of edittext value with first character and when click on list view item then show those those edit text value into different-2 textview of new activity" plz help me in this.
0
[ 2, 184, 20, 1477, 1054, 37, 4444, 10601, 968, 4725, 20, 78, 6936, 60, 19, 13005, 800, 3726, 3726, 2247, 92, 1276, 590, 55, 14, 823, 26, 48, 13, 7, 49, 57, 109, 9392, 1854, 75, 845, 2792, 19, 158, 4155, 129, 10840, 27, 2079, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
getTitle EditText and Database cursor === I am using an EditText as a search field and I am trying to get what the user inputs there read into my Cursor C but it causes crash because editText shows as an int and not a Long. If I manually input a number it works and system does not crash. What am I doing wrong in converting int into long? "This is my code that doesn't work" DBAdapter db = new DBAdapter(this); db.open(); EditText edit = (EditText) findViewById(R.id.edit1); String s = edit.getText().toString(); long n = Integer.parseInt(s); Cursor c = db.getTitle(n); if (c.moveToFirst()) DisplayTitle(c); "This code works but I have to input manually the position for getTitle" DBAdapter db = new DBAdapter(this); db.open(); Cursor c = db.getTitle(6); if (c.moveToFirst()) DisplayTitle(c); Please help.
0
[ 2, 164, 22235, 9392, 11969, 17, 6018, 29588, 800, 3726, 3726, 31, 589, 568, 40, 9392, 11969, 28, 21, 2122, 575, 17, 31, 589, 749, 20, 164, 98, 14, 4155, 6367, 18, 80, 1302, 77, 51, 29588, 272, 47, 32, 4047, 4597, 185, 9392, 1196...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Login using Authentication and Authorising === I have two user "Admin" and "Creator", while login the page i have to authenticate it with database and to give full access to the admin and restrict few access to the creator. can you please give me some idea regarding the above.
0
[ 2, 6738, 108, 568, 27963, 17, 1314, 7552, 800, 3726, 3726, 31, 57, 81, 4155, 13, 7, 1283, 2160, 7, 17, 13, 7, 26438, 7, 15, 133, 6738, 108, 14, 2478, 31, 57, 20, 14351, 1373, 32, 29, 6018, 17, 20, 590, 503, 1381, 20, 14, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Open and view pdf in my aplication === Using this code: try { URL url = new URL(aurl[0]); URLConnection conexion = url.openConnection(); conexion.connect(); int lenghtOfFile = conexion.getContentLength(); Log.d("ANDRO_ASYNC", "Lenght of file: " + lenghtOfFile); InputStream input = new BufferedInputStream(url.openStream()); FileOutputStream fos = openFileOutput("try.pdf", Context.MODE_PRIVATE); //PARA DESCARGARLO EN SD// // OutputStream output = new FileOutputStream("/sdcard/prueba.pdf"); byte data[] = new byte[1024]; long total = 0; while ((count = input.read(data)) != -1) { total += count; publishProgress(""+(int)((total*100)/lenghtOfFile)); fos.write(data, 0, count); } fos.flush(); fos.close(); input.close(); } catch (Exception e) {} return null; I keep in the application a PDF of 8 MB size. I've used several codes to try to open it and view it but can not find the way. Any suggestions? Thanks for all!
0
[ 2, 368, 17, 1418, 13, 11124, 19, 51, 21, 20669, 800, 3726, 3726, 568, 48, 1797, 45, 1131, 13, 1, 287, 6362, 287, 6362, 800, 78, 287, 6362, 5, 1346, 6362, 2558, 387, 500, 6, 73, 287, 6362, 25996, 872, 1065, 1706, 872, 800, 287, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Showing 500 (Internal Server Error) using backbone.js with slim.php when only adding new model === I got this code from https://github.com/ccoenraets/backbone-cellar as I am trying to learn backbone.js. When I am trying to add new model to database using slim.php, it is showing 500 (Internal Server Error). But when I am trying to fetch, update, delete its working good. Why it is showing error only on adding ? Plz help me, Thanks. window.WineView = Backbone.View.extend({ initialize: function () { this.render(); }, render: function () { $(this.el).html(this.template(this.model.toJSON())); return this; }, events: { "click .save" : "beforeSave", "click .delete" : "deleteWine" }, beforeSave: function () { var self = this; var check = this.model.validateAll(); if (check.isValid === false) { utils.displayValidationErrors(check.messages); return false; } // Upload picture file if a new file was dropped in the drop area if (this.pictureFile) { this.model.set("picture", this.pictureFile.name); utils.uploadFile(this.pictureFile, function () { self.saveWine(); } ); } else { this.saveWine(); } return false; }, saveWine: function () { var self = this; this.model.save(null, { success: function (model) { self.render(); app.navigate('wines/' + model.id, false); utils.showAlert('Success!', 'Wine saved successfully', 'alert-success'); }, error: function () { utils.showAlert('Error', 'An error occurred while trying to add this item', 'alert-error'); } }); }, deleteWine: function () { this.model.destroy({ success: function () { alert('Wine deleted successfully'); window.history.back(); } }); return false; } });
0
[ 2, 3187, 3033, 13, 5, 6280, 5025, 8128, 7019, 6, 568, 24036, 9, 728, 18, 29, 8824, 9, 26120, 76, 104, 4721, 78, 1061, 800, 3726, 3726, 31, 330, 48, 1797, 37, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 18264, 219, 525, 6095, 118,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Obtain the first id from a sorted Array through Comparator === I use the following method to sort an array from an sqlite database: public void sortNearby(final double lat, final double lng) { Arrays.sort(videoLocationsDB, new Comparator<VideoLocationDB>() { @Override public int compare(VideoLocationDB lhs, VideoLocationDB rhs) { double lat1 = lhs.latitude; double lng1 = lhs.longitude; double lat2 = rhs.latitude; double lng2 = rhs.longitude; double lhsDistance = countDistance(lat, lng, lat1, lng1); double rhsDistance = countDistance(lat, lng, lat2, lng2); if (lhsDistance < rhsDistance) return -1; else if (lhsDistance > rhsDistance) return 1; else return 0; } }); videoLocationAdapter.notifyDataSetChanged(); } How can I obtain the Id of the first object from the sorted array? for example I need to get `VideoLocationDB.id` of the first object
0
[ 2, 5545, 14, 64, 4924, 37, 21, 22554, 7718, 120, 6479, 512, 3457, 800, 3726, 3726, 31, 275, 14, 249, 2109, 20, 2058, 40, 7718, 37, 40, 4444, 10601, 6018, 45, 317, 11364, 2058, 14114, 779, 5, 4932, 1494, 14303, 15, 426, 1494, 644, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
navigating through table records in Access VBA === I have a table with two columns (value1 and value2) the values are sorted from lowest to highest. example: Value1 20 40 43 90 100 122 Value2 4 5 9 10 15 18 I ask the user to enter an input value and then I calculate the value of CalcFinalValue which can be calculated in one of the following: 1. if the user input value already exist in value1 field, then return the corresponding value of in field value2. for example if the user input is 100 then CalcFinalValue will be 15 2. if the user input value does not exist in value1 field, then locate the two values in value1 field that the input value is between them(for example if the input value is 42, the I want to locate 40 and 43 from value1 field). Calculate CalcFinalValue as: CalcFinalValue=(40*9)+(43*5)/42 in other words the formula will be as: CalcFinalValue=(LowerValue of the inbetween values *lookup value of the HigherValue of the inbetween values)+(HigherValue of the inbetween values *lookup value of the LowerValue of the inbetween values)/(user input value) I want to perform this in Access 2007 VBA. I hope this is clear. Thanks for your help in advance!
0
[ 2, 1775, 13227, 1880, 120, 859, 742, 19, 1381, 566, 969, 800, 3726, 3726, 31, 57, 21, 859, 29, 81, 7498, 13, 5, 15165, 165, 17, 1923, 135, 6, 14, 4070, 50, 22554, 37, 6543, 20, 1554, 9, 823, 45, 1923, 165, 434, 1417, 5016, 315...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Passing Metro style URLs in pushpin options === I am creating a metro style application on windows 8 using JavaScript and Bing map AJAX control 7.0. I want to use the images downloaded in my applications's temp folder for the pushpins. I have tried assigning the paths in following way: var pin = new Microsoft.Maps.Pushpin(pos, { icon: "ms-appdata:///temp/334.jpg", width: 50, height: 50, anchor: anchor, text: "" }); map.entities.push(pin); and also: var pin = new Microsoft.Maps.Pushpin(pos, { icon: "C:\\Users\\aar\\AppData\\Local\\Packages\\787343e5-ac24-43eb-94f4-606f4eca8424_9n3byqn4wqfwa\\TempState\\306.jpg", width: 50, height: 50, anchor: anchor, text: "" }); map.entities.push(pin); But it does not work either way and a run time error is generated in JavaScript. Could someone help me in resolving this? I am not able to understand, how should I pass the path for images in my application's temp folder. NOTE: If I change the icon path to relative location like images/334.jpg, then everything works fine. So its just the URL I am passing are not valid.
0
[ 2, 2848, 3986, 1034, 13, 911, 7532, 19, 3250, 3489, 6368, 800, 3726, 3726, 31, 589, 2936, 21, 3986, 1034, 3010, 27, 1936, 469, 568, 8247, 8741, 17, 18080, 2942, 20624, 569, 453, 9, 387, 9, 31, 259, 20, 275, 14, 3502, 23887, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I find a string inside a string? in php === I know hot to get a string from another string, but only if it's between to things. (using php) I have a string like this: a|1904|103489|0234908| The numbers change. I need to get 103489 How to I do that?
0
[ 2, 184, 92, 31, 477, 21, 3724, 572, 21, 3724, 60, 19, 13, 26120, 800, 3726, 3726, 31, 143, 1047, 20, 164, 21, 3724, 37, 226, 3724, 15, 47, 104, 100, 32, 22, 18, 128, 20, 564, 9, 13, 5, 12655, 13, 26120, 6, 31, 57, 21, 3724...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Want to send automatic mail from asp.net website === I am trying to send an automatic mail from my asp.net website whenever a person will click submit button to enter some value. I have created some codes in C#. It's not showing any error, but also not sending any mail. I am using ip address of the mail server of the organization in the network credential. I am not sure how to provide password for the email address I am using to send mail. I am sharing my code with you. using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.ComponentModel;// for backgroundworker class using System.Net; using System.Net.Mail; using System.Threading; public partial class Contact : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void LoginView1_ViewChanged(object sender, EventArgs e) { } public void Button3_Click(object sender, EventArgs e) { using (SqlConnection connn = new SqlConnection(ConfigurationManager.ConnectionStrings["LeadsDataConnectionString"].ConnectionString)) { SqlCommand command = new SqlCommand(); command.CommandType = System.Data.CommandType.StoredProcedure; command.CommandText = "dbo.LeadProcedure"; command.Parameters.Add("@name", System.Data.SqlDbType.VarChar).Value = TextBox1.Text; command.Parameters.Add("email", System.Data.SqlDbType.VarChar).Value = email.Text; command.Parameters.Add("sub", System.Data.SqlDbType.VarChar).Value = sub.Text; command.Parameters.Add("message", System.Data.SqlDbType.VarChar).Value = message.Text; string from = "info@xxx.com"; string to = "abc@xxx.com"; string mailSubject = sub.Text.ToString(); string mailBody = message.Text.ToString(); MailMessage mess = new MailMessage(from, to, mailSubject, mailBody); mess.IsBodyHtml = true; SmtpClient emailClient = new SmtpClient("//xxx.xxx.x.x/", 25); //Server ip & port emailClient.UseDefaultCredentials = true; //System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential("", ""); //emailClient.Credentials = SMTPUserInfo; //emailClient.Send(mess); // emailClient.Credentials = CredentialCache.DefaultNetworkCredentials; try { emailClient.Send(mess); } catch (Exception ex) { Console.WriteLine("Exception caught in CreateTestMessage1(): {0}", ex.ToString()); } command.Connection = connn; connn.Open(); command.ExecuteNonQuery(); connn.Close(); } TextBox1.Text = ""; email.Text = ""; sub.Text = ""; message.Text = ""; lblmsg.Text = "Data entered successfully!!! Thank You for contacting us! We will get back to you as soon as possible."; //Response.Write("Submitted Succesfully"); Response.Redirect("~/Message.aspx"); } }
0
[ 2, 259, 20, 2660, 6715, 4216, 37, 28, 306, 9, 2328, 2271, 800, 3726, 3726, 31, 589, 749, 20, 2660, 40, 6715, 4216, 37, 51, 28, 306, 9, 2328, 2271, 6634, 21, 840, 129, 10840, 12298, 5167, 20, 2830, 109, 1923, 9, 31, 57, 679, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to render a List in playframework === i am wondering how i can render a List to template as an ajax callback arg. i did this: List<String> filteredTW = Twitt.filtertw(tagname); return ok(filteredTW).as("text/plain"); but is says, i need to define ok(List<String>) function on my own. is it true that Playframework doesnot offer this function? i would be thanksful to any attemp to help.. thanks
0
[ 2, 184, 20, 16535, 21, 968, 19, 418, 8361, 3783, 800, 3726, 3726, 31, 589, 5712, 184, 31, 92, 16535, 21, 968, 20, 22894, 28, 40, 20624, 645, 1958, 13, 10663, 9, 31, 144, 48, 45, 968, 1, 11130, 1, 25090, 38, 499, 800, 13, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to convert date in RFC 3339 to the javascript date object(milliseconds since 1970) === Google calendar throws at me rfc3339, but all my dates are in those milliseconds since jan 1970. rfc3999: 2012-07-04T18:10:00.000+09:00 javascript current time: (new Date()).getTime(): 1341346502585 I prefer the the milliseconds because I only deal in countdowns and not in dates.
0
[ 2, 184, 20, 8406, 1231, 19, 17492, 3534, 3412, 20, 14, 8247, 8741, 1231, 3095, 5, 8702, 49, 5007, 18, 179, 1133, 6, 800, 3726, 3726, 8144, 7036, 13566, 35, 55, 17492, 4048, 3412, 15, 47, 65, 51, 4076, 50, 19, 273, 13436, 5007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When using the accept_nested_attributes_for method, what actually happens when I tell my controller to build the nested form? === What I'm trying to do is update a created item's attributes after it is created through the controller, like so: def create @check_out = CheckOut.new(params[:check_out]) @check_out.request_id = @request.id @check_out.status = 'complete' @check_out.date_taken = Time.now etc..... respond_to do |format| if @check_out.save format.html { redirect_to(@check_out, :notice => 'Check out was successfully created.') } format.xml { render :xml => @check_out, :status => :created, :location => @check_out } else format.html { render :action => "new" } format.xml { render :xml => @check_out.errors, :status => :unprocessable_entity } end end end The issue is that the item created, is created via a nested attribute. I've come to realize, through painful trial and error, that when nested items are created, it is not through their controller, but some other way. I need to figure out how this is done, so I can attempt to come up with a solution.
0
[ 2, 76, 568, 14, 3440, 1, 2696, 1427, 1, 721, 14755, 18, 1, 1106, 2109, 15, 98, 1121, 5531, 76, 31, 494, 51, 9919, 20, 1895, 14, 5618, 69, 505, 60, 800, 3726, 3726, 98, 31, 22, 79, 749, 20, 107, 25, 11100, 21, 679, 9101, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ggplot Area Chart looks uneven === I'm getting greedy here as an earlier ggplot question was answered quickly and accurately, but just in case. I have a time series of percentages - one per annum for a five year period - that I'm trying to turn into an area chart. In spite of the fact that each year's value total 1.0 (100%), however, the tail end of the chart looks uneven. See below: ![plot][1] [1]: http://i.stack.imgur.com/7cijQ.png As you can see, the years 2010 and 2011 look a bit uneven. Here's the data in question: Date "Software Revenue" "Hardware Revenue" "Services Revenue" 5/31/07 0.79 0.00 0.21 5/31/08 0.80 0.00 0.20 5/31/09 0.81 0.00 0.19 5/31/10 0.77 0.09 0.15 5/31/11 0.67 0.19 0.13 5/31/12 0.70 0.17 0.13 And melted: > orpm Date Group Percentage 1 5/31/07 Software % of Revenue 0.79 2 5/31/08 Software % of Revenue 0.80 3 5/31/09 Software % of Revenue 0.81 4 5/31/10 Software % of Revenue 0.77 5 5/31/11 Software % of Revenue 0.67 6 5/31/12 Software % of Revenue 0.70 7 5/31/07 Hardware % Revenue 0.00 8 5/31/08 Hardware % Revenue 0.00 9 5/31/09 Hardware % Revenue 0.00 10 5/31/10 Hardware % Revenue 0.09 11 5/31/11 Hardware % Revenue 0.19 12 5/31/12 Hardware % Revenue 0.17 13 5/31/07 Services % Revenue 0.21 14 5/31/08 Services % Revenue 0.20 15 5/31/09 Services % Revenue 0.19 16 5/31/10 Services % Revenue 0.15 17 5/31/11 Services % Revenue 0.13 18 5/31/12 Services % Revenue 0.13 And here's what I used to generate the plot: > ggplot(orpm,aes(x = Date,y = Percentage)) + + geom_area(aes(group = Group,fill = Group)) + + scale_fill_brewer(type="seq", palette=1) + + opts(legend.position = "bottom") It's not a major issue, obviously, but aesthetically the chart looks off. Any thoughts on what might be artifacting it would be greatly appreciated.
0
[ 2, 13, 4572, 13221, 38, 217, 1795, 1879, 19407, 800, 3726, 3726, 31, 22, 79, 1017, 23833, 235, 28, 40, 1201, 13, 4572, 13221, 38, 1301, 23, 3094, 976, 17, 16353, 15, 47, 114, 19, 610, 9, 31, 57, 21, 85, 231, 16, 5780, 18, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Update subscription payment via Paypal or Google Wallet === I currently enable subscriptions via Paypal and Google Wallet. I'm looking for additional functionality that will allow me to modify the amount of subscription payments per user's usage. For example: if subscription is $5 a month and then user decides to buy some feature for $2 I need a way to update user's subscription fee to $7. It looks like this could be done with: [Paypal Adaptive Payments][1] by pre-approving payments [Merchant Handled subscriptions][2] for Google Wallet. Just want to double check. Are these the right solutions for what I'm trying to accomplish? [1]: https://www.x.com/developers/paypal/documentation-tools/how-to-guides/how-set-payment-preapproval-using-adaptive-payments [2]: https://developers.google.com/checkout/developer/Google_Checkout_Beta_Subscriptions#Merchant_Handled_Subscriptions
0
[ 2, 11100, 14213, 7582, 1197, 1372, 6720, 54, 8144, 17198, 800, 3726, 3726, 31, 871, 9240, 14213, 18, 1197, 1372, 6720, 17, 8144, 17198, 9, 31, 22, 79, 699, 26, 1351, 18548, 30, 129, 1655, 55, 20, 17579, 14, 2006, 16, 14213, 11161, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to resolve ArrayIndexOutOfBoundsException === I am trying to access all the data from database "listOfFolder" table "folder" and want to store the data in a string array folders[] but i am getting how to resolve ArrayIndexOutOfBoundsException. try{ mydb = openOrCreateDatabase("listOfFolder", MODE_WORLD_WRITEABLE, null); }catch (Exception e) { // TODO: handle exception e.printStackTrace(); } int count = 0; String folders[] = null; Cursor folderCursor = mydb.query("folder", null, null, null, null, null, null); while(folderCursor.moveToNext()){ folders[count] = folderCursor.getString(folderCursor.getColumnIndex("name")); count++; }
0
[ 2, 184, 20, 9854, 7718, 25671, 1320, 1041, 7410, 18, 10066, 872, 800, 3726, 3726, 31, 589, 749, 20, 1381, 65, 14, 1054, 37, 6018, 13, 7, 5739, 1299, 1218, 106, 7, 859, 13, 7, 8814, 106, 7, 17, 259, 20, 1718, 14, 1054, 19, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Losing style with load jquery mobile === I've a page with this format: <div id="index" data-role="page"> <div id="container"></div> </div> And I load into #container the content of the page like this: <script type="text/javascript"> $(document).ready(function(){ $('#container').load("pages/content.html"); }); </script> And "pages/content.html" has this content: <div data-role="content"> <a href="pages/calendar.html" data-role="button">Calendar</a> </div> The problem is that the button does not come with the style of jquery mobile .. I tried to do. trigger ('create') but without success. Any Suggestions? Thank you!
0
[ 2, 2281, 1034, 29, 6305, 487, 8190, 93, 3241, 800, 3726, 3726, 31, 22, 195, 21, 2478, 29, 48, 2595, 45, 13, 1, 12916, 4924, 3726, 7, 25671, 7, 1054, 8, 661, 413, 3726, 7, 6486, 7, 1, 13, 1, 12916, 4924, 3726, 7, 1126, 5851, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How well does CSLA.NET work on a web project (ASP.NET MVC)? === I have used CSLA before and I believe that it is a great API for windows, services, and WPF applications. Is it a good API for the web? I feel like there is a lot of bloat in the CSLA API when it comes to using it for the web. I am interested in your thoughts & experience. Thanks
0
[ 2, 184, 134, 630, 272, 18, 531, 9, 2328, 170, 27, 21, 2741, 669, 13, 5, 472, 306, 9, 2328, 307, 8990, 6, 60, 800, 3726, 3726, 31, 57, 147, 272, 18, 531, 115, 17, 31, 985, 30, 32, 25, 21, 374, 21, 2159, 26, 1936, 15, 687, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery autocomplete with google map address lookup === How I can reproduce [this plugin][1] in jsfiddle ? Code so far is [here][2]. My problem is- I can see response data is coming for each request using firebug, but the autocomplete list is not showing up. Thanks for your time guys. Adding the code directly from fiddle - HTML : <!-- required js libraries --> <script type="text/javascript" src="jquery-1.7.1.min.js"></script> <!-- jQuery is directly loaded from fiddle, so in the live example I skipped this line --> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://gmap3.net/js/gmap3-4.1-min.js"></script> <script type="text/javascript" src="https://raw.github.com/jbdemonte/autocomplete/master/jquery-autocomplete.min.js"></script> <!-- this is required to help autocomplete plugin --> <link rel="stylesheet" type="text/css" href="https://raw.github.com/jbdemonte/autocomplete/master/jquery-autocomplete.css" /> <input type="text" id="address" size="60"/> <div id="test" style="height:350px; width:600px"></div>​ And here is the javascript : /*This one initializes the map*/ $("#test").gmap3(); /*This is the autocomplete code*/ $('#address').autocomplete({ source: function() { $("#test").gmap3({ action:'getAddress', address: $(this).val(), callback:function(results){ if (!results) return; $('#address').autocomplete( 'display', results, false ); } }); }, cb:{ cast: function(item){ return item.formatted_address; }, select: function(item) { $("#test").gmap3( {action:'clear', name:'marker'}, {action:'addMarker', latLng:item.geometry.location, map:{center:true} } ); } } });​ [1]: http://gmap3.net/examples/address-lookup.html [2]: http://jsfiddle.net/VBFxp/2/
0
[ 2, 487, 8190, 93, 3108, 15990, 29, 8144, 2942, 3218, 361, 576, 800, 3726, 3726, 184, 31, 92, 21509, 636, 1565, 10922, 108, 500, 2558, 165, 500, 19, 487, 18, 1707, 12312, 13, 60, 1797, 86, 463, 25, 636, 6836, 500, 2558, 135, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to untar all files into one single folder === In one of my applications a user can upload images and archives (ZIP, RAR). When an archive is uploaded, it should be extracted. However, some users will upload archives that contain files in a variety of subfolders (within the archive) What i am looking for is therefore a tar command that will extract **ALL** the files from within the archive into one single folder, no matter what the structure of the archive is. Can this be done with a single command? And if yes, what would that command be?
0
[ 2, 184, 20, 367, 3958, 65, 6488, 77, 53, 345, 19294, 800, 3726, 3726, 19, 53, 16, 51, 3767, 21, 4155, 92, 71, 8294, 3502, 17, 8111, 13, 5, 2553, 306, 15, 13, 15011, 6, 9, 76, 40, 9250, 25, 23782, 15, 32, 378, 44, 18607, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
"SVN Blame" plugin for VisualStudio === I found [this][1] question but the referenced options don't say anything about supporting "blame". What I'm looking for is an integrated way to ask "Who edited the line under the cursor last?" [1]: http://stackoverflow.com/questions/423687
0
[ 2, 13, 7, 18, 16578, 6149, 7, 10922, 108, 26, 3458, 21026, 800, 3726, 3726, 31, 216, 636, 1565, 500, 2558, 165, 500, 1301, 47, 14, 17571, 6368, 221, 22, 38, 395, 602, 88, 3134, 13, 7, 10754, 790, 7, 9, 98, 31, 22, 79, 699, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Designing a tool for estimating project bids === This tool will be used to estimate project costs for clients. These are not necessarily software projects. Currently there is an Excel spreadsheet with a number of categories with individual tasks for each category. Each of these has some sort of weight or constant involved and is partially responsible in determining the final bid estimate. Each of these tasks has attributes for setup hours, setup cost, operation hours and cost, etc. Currently there is no strictly defined method of coming up with the bids. For each new bid, a copy of the spreadsheet is made and modified to most accurately portray what we think the costs and hours will be for the project. Tool requirements: - Need to be able to add new categories/tasks - Need to be able to save a bid and recall it when necessary - Need to be able to modify current weights/constants At the moment I could easily design a database schema and an ASP.NET page layout that could handle this scenario if it wasn't for the fact that you can change the weights/constant over time. I'm thinking (not a fact) that once you save a bid, all of the constants/weights/costs should be saved along with it somehow. This also poses the problem of displaying the bid, how will I be able to determine how to display it if there are 90 versions of the data running around? Any ideas are appreciated. PS: No idea how to tag this.
0
[ 2, 15026, 21, 5607, 26, 13, 15018, 79, 1880, 669, 4458, 18, 800, 3726, 3726, 48, 5607, 129, 44, 147, 20, 10243, 669, 4227, 26, 7421, 9, 158, 50, 52, 9324, 2306, 2314, 9, 871, 80, 25, 40, 20700, 1789, 17627, 29, 21, 234, 16, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Deriving PathInfo class in web routes? === I am reading the [web-routes tutorial][1] in Happstack, and I have no idea what this is doing: $(derivePathInfo ''Sitemap) class PathInfo a where toPathSegments :: a -> [String] fromPathSegments :: URLParser a The doc simply says: > we use template-haskell to derive an instance of PathInfo for the Sitemap type. but where does it "store" it? I thought haskell had no state, and is `PathInfo` our own thing, or is it part of happstack? If someone could explain this, for dummies? Thanks. [1]: http://www.happstack.com/docs/crashcourse/WebRoutes.html#web-routes
0
[ 2, 121, 9655, 68, 2013, 108, 4120, 718, 19, 2741, 5050, 60, 800, 3726, 3726, 31, 589, 1876, 14, 636, 14113, 8, 20179, 18, 29724, 500, 2558, 165, 500, 19, 1458, 3421, 25325, 15, 17, 31, 57, 90, 882, 98, 48, 25, 845, 45, 5579, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Converting string to double in C# === I have a string with double-type values ("value1#value2#value3#...). I split it to string table. Then i want to convert an element from this table to double, and i get error. What is wrong? How can I get from this string (string a) values in double type? Greetings! string a = "52.8725945#18.69872650000002#50.9028073#14.971600200000012#51.260062#15.5859949000000662452.23862099999999#19.372202799999250800000045#51.7808372#19.474096499999973#"; string[] tablicaLatLng = a.Split(new char[] { '#' }); for (int i = 0; i < tablicaLatLng.Length; i++) { Console.WriteLine(tablicaLatLng[i]); } Console.WriteLine(tablicaLatLng[0]); // 52.8725945 Convert.ToDouble(tablicaLatLng[0]); // error
3
[ 2, 19583, 3724, 20, 1494, 19, 272, 5910, 800, 3726, 3726, 31, 57, 21, 3724, 29, 1494, 8, 4474, 4070, 13, 5, 7, 15165, 165, 5910, 15165, 135, 5910, 15165, 240, 5910, 9, 9, 9, 6, 9, 31, 2132, 32, 20, 3724, 859, 9, 94, 31, 259,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Collapsible content using radio button? === I am trying to show and hide a text field based on whether or not the user clicks a radio button. Is this possible? According to the docs, collapsible content needs a header. Here is my code with no collapsible content: <fieldset data-role="controlgroup" data-mini="true"> <input type="radio" name="radio-mini" id="radio-mini-1" value="choice-1" /> <label for="radio-mini-1">No</label> <input type="radio" name="radio-mini" id="radio-mini-2" value="choice-2" /> <label for="radio-mini-2">Yes</label> </fieldset> <label for="textarea-a">Textarea:</label> <textarea name="textarea" id="textarea-a"> </textarea> I would like the textarea to be shown if the radio button labeled "Yes" is clicked. Any ideas?
0
[ 2, 9470, 2552, 18, 3426, 2331, 568, 603, 5167, 60, 800, 3726, 3726, 31, 589, 749, 20, 298, 17, 3077, 21, 1854, 575, 432, 27, 1472, 54, 52, 14, 4155, 10840, 18, 21, 603, 5167, 9, 25, 48, 938, 60, 496, 20, 14, 9765, 18, 15, 94...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to keep website available to some users oonly using htaccess === my website is under construction and i would like to show the website to my friends ,And deny to all users. i used particular ips in htaccess files,but ip is not static . Is there any way to keep mac address ? or any way
0
[ 2, 184, 20, 643, 2271, 904, 20, 109, 3878, 635, 4965, 568, 13, 9020, 20604, 800, 3726, 3726, 51, 2271, 25, 131, 900, 17, 31, 83, 101, 20, 298, 14, 2271, 20, 51, 954, 13, 15, 290, 9258, 20, 65, 3878, 9, 31, 147, 1498, 31, 191...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google Analytics V2 SDK for Android EasyTracker giving errors === I have followed the tutorial for the new Google Analytics V2 SDK for Android located here: https://developers.google.com/analytics/devguides/collection/android/v2/ Unfortunately whenever I go to run the application the reporting is not working and this is the messages that logcat gives me: 07-09 09:13:16.978: W/Ads(13933): No Google Analytics: Library Incompatible. 07-09 09:13:16.994: I/Ads(13933): To get test ads on this device, call adRequest.addTestDevice("2BB916E1BD6BE6407582A429D763EC71"); 07-09 09:13:17.018: I/Ads(13933): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_getSdkConstants();AFMA_buildAdURL({"kw":[],"preqs":0,"session_id":"7925570029955749351","u_sd":2,"seq_num":"1","slotname":"a14fd91432961bd","u_w":360,"msid":"com.mysampleapp.sampleapp","js":"afma-sdk-a-v6.0.1","mv":"8013013.com.android.vending","isu":"2BB916E1BD6BE6407582A429D763EC71","cipa":1,"format":"320x50_mb","net":"wi","app_name":"1.android.com.mysampleapp.sampleapp","hl":"en","u_h":592,"carrier":"311480","ptime":0,"u_audio":3});</script></head><body></body></html> 07-09 09:13:17.041: W/ActivityManager(220): Unable to start service Intent { act=com.google.android.gms.analytics.service.START (has extras) }: not found 07-09 09:13:17.049: W/GAV2(13933): Thread[main,5,main]: Connection to service failed 1 07-09 09:13:17.057: W/GAV2(13933): Thread[main,5,main]: Need to call initializea() and be in fallback mode to start dispatch. 07-09 09:13:17.088: D/libEGL(13933): loaded /system/lib/egl/libGLES_android.so 07-09 09:13:17.096: D/libEGL(13933): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so 07-09 09:13:17.096: D/libEGL(13933): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 07-09 09:13:17.096: D/libEGL(13933): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so Here is my code (I have redacted some of the code that had to do with httppost, etc.): package com.mysampleapp.sampleapp; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONObject; import com.google.analytics.tracking.android.EasyTracker; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.TextView; public class viewRandom extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.viewrandom); uservote.setVisibility(View.GONE); new randomViewClass().execute(); } public void onStart() { super.onStart(); EasyTracker.getInstance().activityStart(this); } public void onStop() { super.onStop(); EasyTracker.getInstance().activityStop(this); } }
0
[ 2, 8144, 26320, 566, 135, 13, 18, 43, 197, 26, 13005, 2010, 4792, 106, 1438, 11908, 800, 3726, 3726, 31, 57, 709, 14, 29724, 26, 14, 78, 8144, 26320, 566, 135, 13, 18, 43, 197, 26, 13005, 335, 235, 45, 7775, 18, 6903, 26051, 445...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Difference on site performance before and after JavaScript Code Package Uploaded === I have been doing some research on ways to measure a site's performance hit by adding different JavaScript Code packages. What tools could I use to do a performance analysis for before and after the code was added to site.
0
[ 2, 2841, 27, 689, 956, 115, 17, 75, 8247, 8741, 1797, 6030, 23782, 800, 3726, 3726, 31, 57, 74, 845, 109, 527, 27, 2847, 20, 4058, 21, 689, 22, 18, 956, 770, 34, 4721, 421, 8247, 8741, 1797, 16875, 9, 98, 4672, 110, 31, 275, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
ruby debugger quit and exit ignore ensure and at_exit hooks === If I stop in my application with the debugger and exit the debugger with exit, quit, exit! or q! (or kill), no ensure blocks are executed. Not even at_exit hooks are executed. It seems, the process is killed althought there is an actual kill command for the debugger - the documentation tells it is to be used in those case when quit does not work. How can I make quit non-working? Is there any workaround? Or can I modify the quit behavior? In my case this may cause severe issues because the debugger is used to stop on exceptions to do some debugging or some fixes but people tend to use quit or q!. Thus, important ensure-blocks are not executed. Actually the debugger is just perfect for this purpose but just for its quit behavior we have to develop our own one? Any help appreciated.
0
[ 2, 10811, 121, 2345, 11356, 6489, 17, 4350, 7174, 4062, 17, 35, 1, 1706, 242, 5559, 18, 800, 3726, 3726, 100, 31, 747, 19, 51, 3010, 29, 14, 121, 2345, 11356, 17, 4350, 14, 121, 2345, 11356, 29, 4350, 15, 6489, 15, 4350, 187, 54...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Appcelerator: Use GCM to get a notification, have that notification open the app === I've got GCM sending notifications to my phone, and my phone can get them (if the app has already been opened. If it's no longer running, it doesn't open. That's also a problem.) However, right now I'm focusing on what happens when I click on a notification that I've received. In particular, nothing happens. I've got it set up so that it should open up the app, via intents, but it's not working. Here's the relevant portion from my app.js: var senderId = 'XXXXXXXXXX'; var c2dm = require('com.findlaw.c2dm'); Ti.API.info("module is => " + c2dm); Ti.API.info('Registering...'); c2dm.registerC2dm(senderId, { success:function(e) { Ti.API.info('JS registration success event: ' + e.registrationId); var params = {devicecode: e.registrationId, deviceType: "Android"}; JOURNAL.webApi.webCallPOST(JOURNAL.serviceLocatorModel.urls.Membership, "/registerdevice", params, JOURNAL.registerDeviceComplete, JOURNAL.registerDeviceError); }, error:function(e) { Ti.API.error("Error during registration: "+e.error); var message; if(e.error == "ACCOUNT_MISSING") { message = "No Google account found; you'll need to add one (in Settings/Accounts) in order to activate notifications"; } else { message = "Error during registration: "+e.error } Titanium.UI.createAlertDialog({ title: 'Push Notification Setup', message: message, buttonNames: ['OK'] }).show(); }, callback:function(e) // called when a push notification is received { Ti.API.info('JS message event: ' + JSON.stringify(e.data)); var intent = Ti.Android.createIntent({ action: Ti.Android.ACTION_MAIN, flags: Ti.Android.FLAG_ACTIVITY_NEW_TASK | Ti.Android.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, className: 'com.geneca.journaling.GenecaJournalingActivity', //className: 'org.appcelerator.titanium.TiActivity', packageName: 'com.geneca.journaling' }); intent.addCategory(Ti.Android.CATEGORY_LAUNCHER); // This is fairly static: Not much need to be altered here var pending = Ti.Android.createPendingIntent({ activity: Ti.Android.currentActivity, intent: intent, type: Ti.Android.PENDING_INTENT_FOR_ACTIVITY, }); var notification = Ti.Android.createNotification({ contentIntent: pending, contentTitle: 'New message', contentText: e.data.message, tickerText: "New message" }); Ti.Android.NotificationManager.notify(1, notification); } }); And here's the relevant portion from my tiapp.xml <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <activity android:name="com.geneca.journaling.GenecaJournalingActivity" /> <permission android:name="com.geneca.journaling.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="com.geneca.journaling.permission.C2D_MESSAGE"/> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> <uses-permission android:name="android.permission.WAKE_LOCK"/> <application> <service android:name="com.findlaw.c2dm.C2DMReceiver"/> <receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE"/> <category android:name="com.geneca.journaling"/> </intent-filter> <intent-filter> <action android:name="com.google.android.c2dm.intent.REGISTRATION"/> <category android:name="com.geneca.journaling"/> </intent-filter> </receiver> </application> </manifest> </android> <modules> <module platform="android" version="0.1">com.findlaw.c2dm</module> </modules> I've run log cat, and it's getting the notification, and the intent, but it spits this out, and doesn't open the app: I/ActivityManager( 307): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.geneca.journaling cmp=com.geneca.journaling/.GenecaJournalingActivity bnds=[0,102][720,230] u=0} from pid -1 W/KeyguardViewMediator( 307): verifyUnlock called when not externally disabled W/InputMethodManagerService( 307): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41c18038 attribute=android.view.inputmethod.EditorInfo@42319798 (The middle one doesn't always show up, so I don't think it's really relevant.) On a side note, if the app isn't open, the log cat gives me `Bad notification posted from package com.geneca.journaling.mobile: Couldn't create icon` and then a bunch of errors.
0
[ 2, 4865, 1105, 1252, 3457, 45, 275, 489, 9095, 20, 164, 21, 52, 4634, 15, 57, 30, 52, 4634, 368, 14, 4865, 800, 3726, 3726, 31, 22, 195, 330, 489, 9095, 4907, 52, 4634, 18, 20, 51, 1132, 15, 17, 51, 1132, 92, 164, 105, 13, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple implementation of Twitter Streaming API iOS5 === I am currently using the Search API for my app, but I am wanting to convert to the Streaming API. My app currently searches for a specific hash tag and some keywords. It returns a simple JSON object that can easily be parsed and displayed. Now, I'm hoping I can do that for the Streaming API. That is, connect to the API, receive a JSON object, parse it, and then display it. I've searched everywhere for a simple way to do this, but all of the Streaming API examples seemed to be way more advanced than I needed it to be. I'm looking for some help to layout a simple approach to this problem.
0
[ 2, 1935, 6123, 16, 10623, 11920, 21, 2159, 13, 7760, 264, 800, 3726, 3726, 31, 589, 871, 568, 14, 2122, 21, 2159, 26, 51, 4865, 15, 47, 31, 589, 4638, 20, 8406, 20, 14, 11920, 21, 2159, 9, 51, 4865, 871, 19994, 26, 21, 1903, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NHibernate.TransientObjectException thrown when saving object in ASP.NET MVC 2 === I'm having a problem with NHibernate throwing a TransientObjectException when I try to save a customer with an associated list of family names in an MVC 2 project I'm working on. This is the code for the classes: public class Customer { public virtual Guid Id { get; set; } public virtual int Version { get; set; } public virtual string Forename { get; set; } public virtual IList<FamilyName> FamilyNames { get; set; } } public class FamilyName { public virtual Guid Id { get; set; } public virtual int Version { get; set; } public virtual string Name{ get; set; } public virtual bool IsCurrent { get; set; } public virtual Patient Patient { get; set; } } I'm using Fluent NHibernate for persistence and the mappings look like this: public CustomerMap() { Table("Customers"); Id(x=>x.Id).GeneratedBy.GuidComb(); Version(x => x.Version); Map(x => x.Forename).Not.Nullable(); HasMany(x => x.FamilyNames) .Inverse() .Cascade.All(); } public FamilyNameMap() { Table("FamilyNames"); Id(x=>x.Id).GeneratedBy.GuidComb(); Version(x => x.Version); Map(x => x.Name).Not.Nullable(); Map(x => x.IsCurrent).Not.Nullable(); References(x => x.Patient).Not.Nullable(); } I have a strongly-typed EditCustomerDetails view with the following code in it: <% using (Html.BeginForm("SaveChanges", "CustomerDetails")) { %> <input type="submit" value="Save changes"/> <%= Html.HiddenFor(customer => customer.Id) %> <%= Html.HiddenFor(customer => customer.Version) %> <label>Forename:</label> <%= Html.TextBoxFor(customer => customer.Forename)%> <label>Family Names</label> <div class="familyNames"> <%= Html.EditorFor(customer => customer.FamilyNames)%> </div> <% } %> This is the custom editor template for the FamilyName class: <%= Html.HiddenFor(name => name.Id) %> <%= Html.HiddenFor(name => name.Version) %> <%= Html.HiddenFor(name => name.Patient.Id) %> <label>Name:</label> <%= Html.TextBoxFor(name => name.Name) %> <label>Is Current?:</label> <%= Html.CheckBoxFor(name =>name.IsCurrent) %> Clicking the Save Changes button calls a method on the controller which passes the customer back to a repository which calls the Update method on the ISession. This is where the NHibernate.TransientObjectException is being thrown with the message "object references an unsaved transient instance - save the transient instance before flushing". I have no idea why this is happening. I've stepped into the code and all the data is being passed back correctly from the view with all objects having the correct property values. The only suggestions I've been able to find to fix this make reference to setting Cascade.All in the mapping which is what I was doing anyway. Any ideas?
0
[ 2, 12109, 15191, 8820, 9, 7028, 49, 2291, 23793, 10066, 872, 6027, 76, 7599, 3095, 19, 28, 306, 9, 2328, 307, 8990, 172, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 29, 12109, 15191, 8820, 6033, 21, 26008, 23793, 10066, 872, 76, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c# google checkout notification acknowledgement errors === I am trying to implement Google Checkout v2 into my project. I'm getting this error come through 5 or 6 times for each order: Error parsing XML; message from parser is: Unexpected element (notification-acknowledgment). Make sure the URL is valid for this command. The XML I'm sending: <notification-acknowledgment xmlns="http://checkout.google.com/schema/2" serial-number="759349983422599-00001-7" /> The XML I'm receiving: <?xml version="1.0" encoding="UTF-8"?> <error xmlns="http://checkout.google.com/schema/2" serial-number="e568fa44-0346-4182-a3c5-9bc9492159fb"> <error-message>Error parsing XML; message from parser is: Unexpected element (notification-acknowledgment). Make sure the URL is valid for this command.</error-message> </error> Even though I get some errors in the integration console, the order still comes through and charges (in the sandbox environment). Is this simply because my callback URL is not https ? I'm able to retrieve and process all the data I need, but want to know what I'm doing wrong to get these errors. My code: if (Request["serial-number"] != null) { // Sandbox HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://sandbox.google.com/checkout/api/checkout/v2/reports/Merchant/" + merchantId); request.ContentType = "application/xml;charset=UTF-8"; request.Accept = "application/xml;charset=UTF-8"; request.Method = "POST"; request.Timeout = 20000; string authorisation = encodeAuthorisation(merchantId, merchantKey); // Sandbox request.Headers.Add("Authorization", "Basic " + authorisation); string xml = "<notification-history-request xmlns=\"http://checkout.google.com/schema/2\">" + "<serial-number>" + Request["serial-number"] + "</serial-number>" + "</notification-history-request>"; StringBuilder data = new StringBuilder(); data.Append(xml); byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString()); // Set the content length in the request headers request.ContentLength = byteData.Length; // Write data using (Stream postStream = request.GetRequestStream()) { postStream.Write(byteData, 0, byteData.Length); } // Get response using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { Stream s = response.GetResponseStream(); string result = ""; using (StreamReader sr = new StreamReader(s)) { result = sr.ReadToEnd(); } DataSet ds = new DataSet(); StringReader srX = new StringReader(result); XmlTextReader xr = new XmlTextReader(srX); // Process data if (result != "") { ds.ReadXml(xr); Trace.Warn(result); } DataTable dt = ds.Tables["new-order-notification"]; // *** check it is new order *** if (dt != null) { DataTable dtBillingAdd = ds.Tables["buyer-billing-address"]; string googleOrderNo = ""; string timestamp = ""; string email = ""; googleOrderNo = dt.Rows[0]["google-order-number"].ToString(); timestamp = dt.Rows[0]["timestamp"].ToString(); email = dtBillingAdd.Rows[0]["email"].ToString(); // Process data Trace.Warn("Google order no: " + googleOrderNo); Trace.Warn("timestamp: " + timestamp); Trace.Warn("email: " + email); } } // handshake // Sandbox request = (HttpWebRequest)WebRequest.Create("https://sandbox.google.com/checkout/api/checkout/v2/reports/Merchant/" + merchantId); request.ContentType = "application/xml;charset=UTF-8"; request.Accept = "application/xml;charset=UTF-8"; request.Method = "POST"; request.Timeout = 20000; // Sandbox request.Headers.Add("Authorization", "Basic " + authorisation); xml = "<notification-acknowledgment xmlns=\"http://checkout.google.com/schema/2\" " + "serial-number=\"" + Request["serial-number"] + "\" />"; data = new StringBuilder(); data.Append(xml); byteData = UTF8Encoding.UTF8.GetBytes(data.ToString()); // Set the content length in the request headers request.ContentLength = byteData.Length; // Write data using (Stream postStream = request.GetRequestStream()) { postStream.Write(byteData, 0, byteData.Length); } } Any help would be greatly appreciated as I've been banging my head against a brick wall for too long on this one! Thanks
0
[ 2, 272, 5910, 8144, 2631, 1320, 52, 4634, 27878, 11908, 800, 3726, 3726, 31, 589, 749, 20, 8713, 8144, 2631, 1320, 566, 135, 77, 51, 669, 9, 31, 22, 79, 1017, 48, 7019, 340, 120, 331, 54, 400, 436, 26, 206, 389, 45, 7019, 2017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# Method Name Expected - Multithreading === Hi I've created this script in C# but is giving the 'Method Name Expected' Error. What am I doing wrong? for (int i = 0; i < numberofThreads2; i++) { Thread thread1 = new Thread(new ThreadStart (Start(1, 2, 3, 4, 5))); thread1.Start(); }
0
[ 2, 272, 5910, 2109, 204, 1727, 13, 8, 1889, 96, 22883, 800, 3726, 3726, 4148, 31, 22, 195, 679, 48, 3884, 19, 272, 5910, 47, 25, 1438, 14, 13, 22, 5909, 1807, 43, 204, 1727, 22, 7019, 9, 98, 589, 31, 845, 1389, 60, 26, 13, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP -Codeigniter using UwAmp - Error database connexion === I try to run codeigniter using Uwamp locally. I configured the database.php config file like for wamp. If I load the database library, i see the following error message: A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: C:\UwAmp\www\site\system\database\DB_driver.php Line Number: 124 So there seems to be a problem with the conexion with the database. I use this from work so I'm wondering if this is not a security setting that prevent to connect to a database locally.. Thanks for your help!
0
[ 2, 13, 26120, 13, 8, 9375, 9693, 242, 106, 568, 13, 17059, 2554, 13, 8, 7019, 6018, 15201, 1706, 872, 800, 3726, 3726, 31, 1131, 20, 485, 1797, 9693, 242, 106, 568, 13, 17059, 2554, 6680, 9, 31, 28895, 14, 6018, 9, 26120, 13, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MS access database in VB.NET === I followed a tutorial on the internet to create my own database. I succesfully built a program upon it. Then I created an access .mdb file(another database) and then I just changed the database which the program connected to, to the one which I created. >>I just made that one change But then it started showing me error whenever I tried to update using da.update(ds,"Phone Book") where da is data adapter and ds is data set. The error was: " syntax error in INSERT INTO statement" I HAVE JUST CHANGED THE DATABASE TO WHICH THE PROGRAM IS CONNECTING. I did not change the code one bit. Please help me, its getting me frustrated.
0
[ 2, 4235, 1381, 6018, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 31, 709, 21, 29724, 27, 14, 2620, 20, 1600, 51, 258, 6018, 9, 31, 21792, 5052, 5655, 392, 21, 625, 685, 32, 9, 94, 31, 679, 40, 1381, 13, 9, 79, 9007, 3893, 5, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convert Windows paths in filenames to Linux directory structure === I have a bunch of files on Linux (Ubuntu) in a single folder. The filenames are as follows. (They are all in one folder, the actual filenames contain the backslashes.) Folder1\Subfolder2\File1.php Folder2\Subfolder1\File3.php etc They are nested in lots of subfolders. How do I convert these path strings to an actual directory tree in Linux? I know this can be done with a script or programatically, but I was wondering if there was a quick bash command or existing tool to do this. Thanks.
0
[ 2, 8406, 1936, 12074, 19, 3893, 7259, 18, 20, 13024, 16755, 1411, 800, 3726, 3726, 31, 57, 21, 7653, 16, 6488, 27, 13024, 13, 5, 4502, 1020, 2473, 6, 19, 21, 345, 19294, 9, 14, 3893, 7259, 18, 50, 28, 2415, 9, 13, 5, 2077, 50,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which layer I should implement caching === My website is going. However, having many clients to call to server to get data which will connect to database to retrieve. To improve database's performance, I need to implement cache in web server. I should implement it in Data Access or Model layer. I'm using ASP.NET MVC. Thanks.
0
[ 2, 56, 5385, 31, 378, 8713, 1658, 7192, 800, 3726, 3726, 51, 2271, 25, 228, 9, 207, 15, 452, 151, 7421, 20, 645, 20, 8128, 20, 164, 1054, 56, 129, 6379, 20, 6018, 20, 11917, 9, 20, 3545, 6018, 22, 18, 956, 15, 31, 376, 20, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SqlDataSource adds new columns to Gridview? === <div style="width:100%; height:200px; overflow:scroll; border-color:White;"> <asp:GridView ID="UsersGridView" runat="server" CssClass="label" ShowHeaderWhenEmpty="True" Width="100%" AllowSorting="True" HeaderStyle-BackColor="LightGray" CellPadding="4" ForeColor="#333333" GridLines="None" DataSourceID="UsersDataSource" > <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:BoundField HeaderText="Fleet Description" ReadOnly="True" HeaderStyle-Wrap="false" HtmlEncode="True" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="Fleet Code" HeaderText="Fleet Code" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="First Name" HeaderText="First Name" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="Last Name" HeaderText="Last Name" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="Username" HeaderText="User Name" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="Email" HeaderText="Email" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="Phone" HeaderText="Phone" ReadOnly="True" HeaderStyle-Wrap="false" > <HeaderStyle Wrap="False"></HeaderStyle> </asp:BoundField> </Columns> <EditRowStyle BackColor="#999999" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"></HeaderStyle> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#E9E7E2" /> <SortedAscendingHeaderStyle BackColor="#506C8C" /> <SortedDescendingCellStyle BackColor="#FFFDF8" /> <SortedDescendingHeaderStyle BackColor="#6F8DAE" /> </asp:GridView> <asp:SqlDataSource ID="UsersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="SELECT UserDataAssociation.Fleet as &quot;Fleet Code&quot;, UserDataAssociation.FirstName as &quot;First Name&quot;, UserDataAssociation.LastName as &quot;Last Name&quot;, aspnet_Users.UserName, aspnet_Membership.Email, UserDataAssociation.Phone FROM aspnet_Membership INNER JOIN aspnet_Users ON aspnet_Membership.UserId = aspnet_Users.UserId INNER JOIN UserDataAssociation ON aspnet_Membership.UserId = UserDataAssociation.UserId"></asp:SqlDataSource> </div> I have this gridview for the sqldatasource with a select statement. However when the page is loaded, the gridview has double its original columns, created by the datasource. I would like that not to be the case obviously. What am I doing wrong? Thanks
0
[ 2, 4444, 255, 18768, 12097, 10621, 78, 7498, 20, 7354, 4725, 60, 800, 3726, 3726, 13, 1, 12916, 1034, 3726, 7, 3976, 43, 96, 6608, 3621, 73, 2947, 45, 4621, 306, 396, 73, 20285, 45, 3862, 8694, 73, 1862, 8, 11282, 45, 5051, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
getTouchables can not get Listview === I create ListView in Even Oncreate here my code private ListView mainListView ; private ArrayAdapter<String> listAdapter ; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mainListView = new ListView(this); String[] planets = new String[] { "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"}; ArrayList<String> planetList = new ArrayList<String>(); planetList.addAll( Arrays.asList(planets) ); listAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, planetList); mainListView.setAdapter( listAdapter ); LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); ll.addView(mainListView); setContentView(ll); } and I Override OnPostResume Event to check something ,I use getTouchables mathod to get Arraylist of View In Screen here my code @Override protected void onPostResume() { // TODO Auto-generated method stub super.onPostResume(); ArrayList<View> alv = ((ViewGroup)getWindow().getDecorView().getRootView()).getTouchables(); Log.d("LibsCustom", Integer.toString(alv.size())); } but Log is show value 0, I think it must show 1(it is ListView) Why?
0
[ 2, 164, 15725, 579, 18, 92, 52, 164, 968, 4725, 800, 3726, 3726, 31, 1600, 968, 4725, 19, 166, 27, 6037, 1373, 235, 51, 1797, 932, 968, 4725, 407, 5739, 4725, 13, 73, 932, 7718, 27576, 106, 1, 11130, 1, 968, 27576, 106, 13, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Writing an R package depending on differing packages per architecture === I want to build a package that involves loading data from mysql using different packages depending on the user's system. For a windows user it would be through an ODBC connection via package RODBC, while a linux/mac user would use the RMySQL package. In a script, the following works very well: if(.Platform$OS.type == "unix") { library(RMySQL) } else { library(RODBC) } Now I would like to have these packages loaded at the loading of my package. I would normally add it in the DESCRIPTION file, under 'Depends:', but this doesn't allow the optional clause. What is the best way to handle this ?
0
[ 2, 1174, 40, 761, 6030, 4758, 27, 19304, 16875, 416, 2607, 800, 3726, 3726, 31, 259, 20, 1895, 21, 6030, 30, 6569, 12797, 1054, 37, 51, 18, 22402, 568, 421, 16875, 4758, 27, 14, 4155, 22, 18, 329, 9, 26, 21, 1936, 4155, 32, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
'python setup.py nosetests' reports that package's __init__.py is not covered by tests === When I test https://bitbucket.org/petar/beam_integrals with `python setup.py nosetests` I get a **96% coverage**: ---------------------------------------------------------------------- XML: nosetests.xml Name Stmts Miss Cover Missing ------------------------------------------------------------------------------ beam_integrals 7 7 0% 1-24 beam_integrals.beam_types 79 0 100% beam_integrals.characteristic_equation_solvers 65 0 100% beam_integrals.exceptions 6 0 100% beam_integrals.utils 14 0 100% ------------------------------------------------------------------------------ TOTAL 171 7 96% ---------------------------------------------------------------------- Ran 634 tests in 178.245s OK (SKIP=3) However if I test the same code with `nosetests` I get **full coverage**: ---------------------------------------------------------------------- XML: nosetests.xml Name Stmts Miss Cover Missing ------------------------------------------------------------------------------ beam_integrals 7 0 100% beam_integrals.beam_types 79 0 100% beam_integrals.characteristic_equation_solvers 65 0 100% beam_integrals.exceptions 6 0 100% beam_integrals.utils 14 0 100% ------------------------------------------------------------------------------ TOTAL 171 0 100% ---------------------------------------------------------------------- Ran 634 tests in 179.226s OK (SKIP=3) It seems `python setup.py nosetests` isn't properly reporting test coverage of the `beam_integrals` module. This issue has been verified on: 1. our [continuous integration server](http://ci.petarmaric.com/job/beam_integrals/) running Ubuntu 10.04 Server 32bit 1. a freshly created Rackspace Cloud Server running Ubuntu 12.04 Server 64bit with the following setup: $ sudo aptitude update $ sudo aptitude upgrade $ sudo reboot $ sudo aptitude install python-pip mercurial git-core python-gmpy python-dev $ hg clone https://bitbucket.org/petar/beam_integrals $ sudo pip install -r beam_integrals/requirements.txt $ sudo pip install -r beam_integrals/requirements-test.txt $ cd beam_integrals $ python setup.py nosetests $ nosetests
0
[ 2, 13, 22, 6448, 11570, 18161, 9, 6448, 2689, 10543, 18, 22, 2813, 30, 6030, 22, 18, 13, 1, 108, 242, 1, 9, 6448, 25, 52, 1363, 34, 4894, 800, 3726, 3726, 76, 31, 1289, 7775, 18, 6903, 3326, 11925, 1198, 9, 5583, 118, 6240, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to design header for to move between any page in my website by ajax like google and facebook? === i want design header for all page in my website .The function of this header is move between page how can do that??? i can using php and ajax .
0
[ 2, 184, 20, 704, 157, 106, 26, 20, 780, 128, 186, 2478, 19, 51, 2271, 34, 20624, 101, 8144, 17, 9090, 60, 800, 3726, 3726, 31, 259, 704, 157, 106, 26, 65, 2478, 19, 51, 2271, 13, 9, 124, 1990, 16, 48, 157, 106, 25, 780, 128,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CUPTI / CUDA prof_trigger not working as expected === According to NVidia, __prof_trigger() calls are executed at warp-level, or in other words, each warp will increment the specified trigger by 1. So i wrote a small kernel to test this out: __global__ void kernel(int *arr) { __prof_trigger(00); // from here, it's irrevelant to the question int id = threadIdx.x + blockDim.x * blockIdx.x; if (id >= N) return; __prof_trigger(01); if (arr[id] < 4) __prof_trigger(02); else __prof_trigger(03); } I invoke the program using: ./prof_trigger_test <block_size> <event_name> i only tested with a single block (from my understanding, different amount of blocks shouldn't affect this question, or am i wrong?) and event name is the name given by CUPTI, or prof_trigger_XX, which is translated to the event id in runtime. So given that warp size is 32, i should expect something like: ./prof_trigger_test 1 prof_trigger_00 // expected to return 1 ./prof_trigger_test 33 prof_trigger_00 // expected to return 2 prof_trigger_00 should increase each time i increase the number of threads by 32 (which requires a new warp) This is not the case. When running on my latop, with a NVidia 9600M GT, instead of 32, i only need to increase by 4 to see an incremented value of the counter. And running on a remote cluster, using a Tesla M2070, the required increment is 8 So clearly i'm missing something. Is the GPU creating smaller warps for some reason (performance, i would think, although not sure how)?
0
[ 2, 480, 1388, 13, 118, 272, 5729, 8721, 1, 3367, 11356, 52, 638, 28, 1727, 800, 3726, 3726, 496, 20, 13, 20763, 18175, 15, 13, 1, 2740, 410, 1, 3367, 11356, 5, 6, 3029, 50, 5557, 35, 176, 306, 8, 3906, 15, 54, 19, 89, 715, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Irrlicht error "No Entry point" === I have done some project in Irrlicht and it compiles all well, however when I try to run it, it gives me following error The procedure entry point ?IdenttityMatrix@core@irr@@3V?$CMatrix4@M@12@B could not be located in the dynamic link library Irrlicht.dll. What am I missing here, 'cause I can't figure out what exactly it is complaining about. Thanks in advance.
0
[ 2, 31, 5932, 8945, 38, 7019, 13, 7, 251, 2792, 454, 7, 800, 3726, 3726, 31, 57, 677, 109, 669, 19, 31, 5932, 8945, 38, 17, 32, 26561, 18, 65, 134, 15, 207, 76, 31, 1131, 20, 485, 32, 15, 32, 2352, 55, 249, 7019, 14, 7004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GraphViz Dot layout of nodes without an edge === I'm calculating quite big layouts with the GraphViz dot layout. My source structure is a graph where some nodes are connected and others not. The layout for the connected nodes is perfect, but dot alignes all other nodes in a straight row, which leads to a quite huge length of the output. Is there any change to get rid of this? Thanks
0
[ 2, 7210, 1755, 380, 14123, 9106, 16, 16272, 366, 40, 1407, 800, 3726, 3726, 31, 22, 79, 22937, 1450, 580, 9106, 18, 29, 14, 7210, 1755, 380, 14123, 9106, 9, 51, 1267, 1411, 25, 21, 7210, 113, 109, 16272, 50, 2587, 17, 654, 52, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hibernate Many to one - Getting Duplicate Entry exception === I have 2 entity class called Student and University and relationship between student and university is Many-to-one which means many students can study in one university. My input jsp page basically will ask the university name and student email address to register. Here is the flow. I enter following in my input page - university1, student1 - This will add university1 and student1 in my database. When I enter - university1, student2 - My intention here is to first find whether university1 is already present in my database. If it is then associate the same university to student object and try to save it. But when I am doing that hibernate is trying to add one more university object in the database and I am getting following exception - com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'university_id'. Here are my entity classes - @Entity @Table(name="students") public class Student implements Serializable{ private Integer studentId; private University university; @Id @GeneratedValue @Column(name = "student_id") public Integer getStudentId() { return studentId; } @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "university_id") public University getUniversity() { return university; } } @Entity @Table(name="university") public class University implements Serializable { private Integer universityId; @Id @GeneratedValue @Column(name = "university_id") public Integer getUniversityId() { return university; } public void setCompanyId(Integer companyId) { this.companyId = companyId; } @Column(name = "university_name", unique = true, nullable = false) public String getUniversityName() { return university; } } Here is the simple Java Code. University university = universityService.getUniversityByName(student.getUniversity().getUniversityName()); if(university != null) { student.setUniversity(university); } getHibernateTemplate().saveOrUpdate(student); I am using Spring MVC and database schema is getting generated by Hibernate. Looks like I am making some very basic mistake.
0
[ 2, 4148, 2102, 8820, 151, 20, 53, 13, 8, 1017, 19429, 2792, 5391, 800, 3726, 3726, 31, 57, 172, 9252, 718, 227, 1209, 17, 155, 17, 1429, 128, 1209, 17, 155, 25, 151, 8, 262, 8, 849, 56, 1108, 151, 573, 92, 949, 19, 53, 155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mySQL - Compare Table Rows === I'm just not too sure the proper way of doing this. I basically have 2 tables. Both table have the same structure. Database1 (Current data average 20k rows), Database2 (accumlation of Data, can go over 1 mil row at any given time). I want to compare both tables and give me result from Database1 that does NOT exist in the Database2 with a specific timestamp query. What I have and tried yet query takes too long to search. Tried: select distinct player from Database1 where not exists (select player from Database2 where snap = 1340981695) SELECT Database1.player FROM Database1 INNER JOIN Database2 ON Database1.player NOT IN (Database2.player) AND Database2.snap = 1340981695 GROUP BY Database1.player select distinct Database1.player from Database1 left join Database2 on Database1.player not in (Database2.player) and Database2.snap = 1340981695 I still cannot get my head wrapped around this. Thanks for assistance.
0
[ 2, 51, 18, 22402, 13, 8, 11590, 859, 11295, 800, 3726, 3726, 31, 22, 79, 114, 52, 266, 562, 14, 4119, 161, 16, 845, 48, 9, 31, 11374, 57, 172, 7484, 9, 156, 859, 57, 14, 205, 1411, 9, 6018, 165, 13, 5, 17657, 1054, 862, 434,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Transfer files server to server === I need to transfer one account to a different server. The big problem is: one have Cpanel (Good!) and other have Custom Branded Panel (Bad =(). So, I thinked: How about to transfer with PHP? (how? Don't know) I know server support exec, and I have Jailsshell (SSH), but, wget are disabled. Dont know about others restrictions. Ideas?
0
[ 2, 2617, 6488, 8128, 20, 8128, 800, 3726, 3726, 31, 376, 20, 2617, 53, 2176, 20, 21, 421, 8128, 9, 14, 580, 1448, 25, 45, 53, 57, 272, 3206, 532, 13, 5, 3264, 187, 6, 17, 89, 57, 5816, 15274, 4113, 13, 5, 5989, 800, 5, 6, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to choose the second submit button using python mechanize? === I am trying to make this script that can automatically post to my wordpress blog using python mechanize.So far I have been successful in login in but now posting.The problem is that my forms contains more than button of type submit. <post POST http://androidcracks4u.com/wp-admin/post.php application/x-www-form-urlencoded <HiddenControl(_wpnonce=607cf3e435) (readonly)> <HiddenControl(_wp_http_referer=/wp-admin/post-new.php) (readonly)> <HiddenControl(user_ID=1) (readonly)> <HiddenControl(action=editpost) (readonly)> <HiddenControl(originalaction=editpost) (readonly)> <HiddenControl(post_author=1) (readonly)> <HiddenControl(post_type=post) (readonly)> <HiddenControl(original_post_status=auto-draft) (readonly)> <HiddenControl(referredby=) (readonly)> <HiddenControl(_wp_original_http_referer=) (readonly)> <HiddenControl(auto_draft=1) (readonly)> <HiddenControl(post_ID=1429) (readonly)> <HiddenControl(autosavenonce=3d2530ec68) (readonly)> <HiddenControl(meta-box-order-nonce=076a9bd6d8) (readonly)> <HiddenControl(closedpostboxesnonce=7c40c0d264) (readonly)> <TextControl(post_title=)> <HiddenControl(samplepermalinknonce=e8999dcb83) (readonly)> <TextareaControl(content=)> <HiddenControl(gdsr_post_edit=edit) (readonly)> <SelectControl(gdsr_review=[*-1, 0, 1, 2, 3, 4, 5])> <SelectControl(gdsr_review_decimal=[*-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])> <SelectControl(gdsr_vote_articles=[*A, V, U, N, H, I])> <SelectControl(gdsr_recc_vote_articles=[*A, V, U, N, H, I])> <SelectControl(gdsr_cmm_vote_articles=[*A, V, U, N, H, I])> <SelectControl(gdsr_recc_cmm_vote_articles=[*A, V, U, N, H, I])> <SubmitControl(save=Save) (readonly)> <SubmitControl(save=Save Draft) (readonly)> <HiddenControl(wp-preview=) (readonly)> <HiddenControl(hidden_post_status=draft) (readonly)> <SelectControl(post_status=[pending, *draft])> <HiddenControl(hidden_post_password=) (readonly)> <CheckboxControl(hidden_post_sticky=[sticky])> <HiddenControl(hidden_post_visibility=public) (readonly)> <RadioControl(visibility=[*public, password, private])> <CheckboxControl(sticky=[sticky])> <TextControl(post_password=)> <SelectControl(mm=[01, 02, 03, 04, 05, 06, *07, 08, 09, 10, 11, 12])> <TextControl(jj=01)> <TextControl(aa=2012)> <TextControl(hh=07)> <TextControl(mn=42)> <HiddenControl(ss=17) (readonly)> <HiddenControl(hidden_mm=07) (readonly)> <HiddenControl(cur_mm=07) (readonly)> <HiddenControl(hidden_jj=01) (readonly)> <HiddenControl(cur_jj=01) (readonly)> <HiddenControl(hidden_aa=2012) (readonly)> <HiddenControl(cur_aa=2012) (readonly)> <HiddenControl(hidden_hh=07) (readonly)> <HiddenControl(cur_hh=07) (readonly)> <HiddenControl(hidden_mn=42) (readonly)> <HiddenControl(cur_mn=42) (readonly)> <HiddenControl(original_publish=Publish) (readonly)> <SubmitControl(publish=Publish) (readonly)> <CheckboxControl(<None>=[3])> <CheckboxControl(<None>=[242])> <CheckboxControl(<None>=[6])> <CheckboxControl(<None>=[243])> <CheckboxControl(<None>=[1])> <CheckboxControl(<None>=[248])> <CheckboxControl(<None>=[11])> <CheckboxControl(<None>=[5])> <HiddenControl(post_category[]=0) (readonly)> <CheckboxControl(post_category[]=[242, 3, 243, 248, 6, 1, 5, 11])> <TextControl(newcategory=New Category Name)> <SelectControl(newcategory_parent=[*-1, 242, 3, 243, 248, 6, 1, 5, 11])> <IgnoreControl(<None>=<None>)> <HiddenControl(_ajax_nonce-add-category=b4106a7abf) (readonly)> <TextareaControl(tax_input[post_tag]=)> <TextControl(newtag[post_tag]=)> <IgnoreControl(<None>=<None>)> <CheckboxControl(lavalinx_options[trade_hide]=[1])> <TextControl(syn_anchor=)> <TextControl(yoast_wpseo_focuskw=)> <TextControl(yoast_wpseo_title=)> <TextareaControl(yoast_wpseo_metadesc=)> <SelectControl(yoast_wpseo_meta-robots-noindex=[*0, 2, 1])> <RadioControl(yoast_wpseo_meta-robots-nofollow=[*0, 1])> <SelectControl(yoast_wpseo_meta-robots-adv[]=[*none, noodp, noydir, noarchive, nosnippet])> <TextControl(yoast_wpseo_canonical=)> <TextControl(yoast_wpseo_redirect=)> <TextareaControl(excerpt=)> <TextControl(trackback_url=)> <SelectControl(metakeyselect=[*#NONE#, additional_settings, featured, form, ks_metadata, mail, mail_2, messages, ta_post_review_name, ta_post_review_rating, thumb, views])> <TextControl(metakeyinput=)> <TextareaControl(metavalue=)> <SubmitControl(addmeta=Add Custom Field) (readonly)> <HiddenControl(_ajax_nonce-add-meta=20eb15a8e6) (readonly)> <HiddenControl(advanced_view=1) (readonly)> <CheckboxControl(comment_status=[*open])> <CheckboxControl(ping_status=[*open])> <TextControl(post_name=)> <SelectControl(post_author_override=[*1])> <HiddenControl(yarpp_display-nonce=69e8eaec4f) (readonly)>> As you see there are more than 1 submit button in this form.I want to click this button `<SubmitControl(publish=Publish)` .Any idea of how I can achieve that??
0
[ 2, 184, 20, 3538, 14, 153, 12298, 5167, 568, 20059, 55, 3606, 2952, 60, 800, 3726, 3726, 31, 589, 749, 20, 233, 48, 3884, 30, 92, 7499, 678, 20, 51, 833, 5890, 8146, 568, 20059, 55, 3606, 2952, 9, 656, 463, 31, 57, 74, 1300, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
spring access property file values using ClassPathXmlApplicationContext === How do i access the property file values if I am using the ClassPathXmlApplicationContext Is there a way to get it by using x = context.getBean("") and then x.getProperty("firstName"). I want to use it in main class, so I am not looking to inject it using @Value Thanks
0
[ 2, 1573, 1381, 1354, 3893, 4070, 568, 718, 8353, 396, 79, 11873, 20669, 1126, 11969, 800, 3726, 3726, 184, 107, 31, 1381, 14, 1354, 3893, 4070, 100, 31, 589, 568, 14, 718, 8353, 396, 79, 11873, 20669, 1126, 11969, 25, 80, 21, 161, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to obtain every possible combination within multiple ranges in Python? === Suppose I have the following code to collect all the possible combinations. abArray = [] for a in range(minA, maxA, aStep): for b in range(minB, maxB, bStep): if a < b: continue abArray.append((a,b)) Is there a more efficient way to store all possible combinations with a condition rather than using nested for loops?
0
[ 2, 98, 25, 14, 246, 161, 20, 5545, 352, 938, 3733, 363, 1886, 9230, 19, 20059, 60, 800, 3726, 3726, 5787, 31, 57, 14, 249, 1797, 20, 5543, 65, 14, 938, 17908, 9, 21, 18603, 93, 800, 20767, 26, 21, 19, 978, 5, 6525, 15, 2049, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Logic Help: comparing values and taking the smallest distance, while removing it from the list of "available to compare" === Okay, I have been set with the task of comparing this list of Photons using one method (IU) and comparing it with another (TSP). I need to take the first IU photon and compare distances with **all** of the TSP photons, find the smallest distance, and "pair" them (i.e. set them both in arrays with the same index). Then, I need to take the next photon in the IU list, and compare it to all of the TSP photons, **minus** the one that was chosen already. I know I need to use a Boolean array of sorts, with keeping a counter. I can't seem to logic it out entirely. The code below is NOT standard C++ syntax, as it is written to interact with ROOT (CERN data analysis software). If you have any questions with the syntax to better understand the code, please ask. I'll happily answer. I have the arrays and variables declared already. The types that you see are called EEmcParticleCandidate and that's a type that reads from a tree of information, and I have a whole set of classes and headers that tell that how to behave. Thanks. Bool_t used[2]; if (num[0]==2 && num[1]==2) { TIter photonIterIU(mPhotonArray[0]); while(IU_photon=(EEmcParticleCandidate_t*)photonIterIU.Next()){ if (IU_photon->E > thresh2) { distMin=1000.0; index = 0; IU_PhotonArray[index] = IU_photon; TIter photonIterTSP(mPhotonArray[1]); while(TSP_photon=(EEmcParticleCandidate_t*)photonIterTSP.Next()) { if (TSP_photon->E > thresh2) { Float_t Xpos_IU = IU_photon->position.fX; Float_t Ypos_IU = IU_photon->position.fY; Float_t Xpos_TSP = TSP_photon->position.fX; Float_t Ypos_TSP = TSP_photon->position.fY; distance_1 = find distance //formula didnt fit here // if (distance_1 < distMin){ distMin = distance_1;; for (Int_t i=0;i<2;i++){ used[i] = false; } used[index] = true; TSP_PhotonArray[index] = TSP_photon; index++; Thats all I have at the moment... work in progress, I realize all of the braces aren't closed. This is just a simple logic question.
0
[ 2, 7085, 448, 45, 15047, 4070, 17, 741, 14, 11056, 1583, 15, 133, 9096, 32, 37, 14, 968, 16, 13, 7, 4961, 947, 579, 20, 11590, 7, 800, 3726, 3726, 1705, 15, 31, 57, 74, 309, 29, 14, 3005, 16, 15047, 48, 968, 16, 3056, 2172, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to increment a numeric string by +1 with Javascript/jQuery === I have the following variable: pageID = 7 I'd like to increment this number on a link: $('#arrowRight').attr('href', 'page.html?='+pageID); So this outputs 7, I'd like to append the link to say 8. But if I add +1: > $('#arrowRight').attr('href', 'page.html?='+pageID+1); I get the following output: 1.html?=71 instead of 8. How can I increment this number to be pageID+1?
0
[ 2, 184, 20, 13, 28461, 21, 15764, 596, 3724, 34, 13, 16628, 29, 8247, 8741, 118, 728, 8190, 93, 800, 3726, 3726, 31, 57, 14, 249, 7612, 45, 2478, 1340, 800, 453, 31, 22, 43, 101, 20, 13, 28461, 48, 234, 27, 21, 3508, 45, 5579,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google Chrome Developer Tools (and Firefox firebug) do not updating script tab content on iframe postback === I ran into a problem when trying to debug my web application which uses an iframe. This is an ASP.NET application, so it uses postbacks. I was trying to set javascript breakpoints into the web page in the iframe using the Scripts tab. I navigated to the correct page in the left pane and clicked it. But this page had old content, that was not from the post back, and thus it was thus not possible to set break points on it to correct locations. The same thing happened on both Google Chrome Developer Tools and Firefox Firebug. Is there something that I do not understand, such as if I would need to refresh the content manually, or am I just doing something wrong? How can I get the script tab to show the correct content after the iframe has been postbacked? Has anyone else run into the same problem? Thanks in advance!
0
[ 2, 8144, 13, 12985, 10058, 4672, 13, 5, 290, 535, 18219, 535, 16254, 6, 107, 52, 71, 43, 1880, 3884, 6523, 2331, 27, 31, 8361, 678, 1958, 800, 3726, 3726, 31, 717, 77, 21, 1448, 76, 749, 20, 121, 16254, 51, 2741, 3010, 56, 2027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...