unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
How to read and display data from a CO2 logger connected via rs232? === I got a Licor CO2-Logger (Li-820) for a scientific experiment. The Li-820 outputs an analog signal (voltage) and also offers a serial communication via a RS232 port. I would like to sniff the serial communication with an arduino uno and display the CO2 values on a LCD display such that I can control the analog signal that is logged in a computer system. I want to display both the analog and the digital signal. I use a rs232 level shifter to connect the Licor CO2 analyzer to the arduino uno and I can sniff the COM port successfully both with the arduino serial monitor and a sniffer program. Over the rs232 port the Li-820 device outputs an xml-like line that is as follows: <li820><data><celltemp>5.1252350e1</celltemp><cellpres>9.7159633e1</cellpres><co2>5.2527637e2</co2><co2abs>7.7893261e-2</co2abs><ivolt>1.1386718e1</ivolt><raw>3950702,3808028</raw></data></li820> I would like to parse that information for the relevant part with the arduino uno which is the "5.2527637e2" ("CO2" value) and first output it to the serial monitor. Next, I will display that value on a LCD display. This last step should be a minor problem. So, how can I parse the information for the relevant bits and then display it to the serial monitor. I looked into many examples on the net. A modified version of the working code from here (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1287446626) and here (http://stackoverflow.com/questions/8370918/rs-232-communication-using-an-arduino-duemilanove-and-the-cutedigi-rs-232-interf) was the closest I got. I am aware of some xml libraries for the arduino platform. However, I cannot access the xml line in the first place. Any direct help or linkage to other sources of information is greatly appreciated. Please tell me in case that this is the wrong forum or that you need further information about my electronic/sofware problem. REMARK: I already posted this on [electronics.stackexchange.com/] but some good folks there recommended me to post this question also here. Due to low reputation I could not migrate the question.
0
[ 2, 184, 20, 1302, 17, 3042, 1054, 37, 21, 326, 135, 13, 29480, 2587, 1197, 13, 1224, 20730, 60, 800, 3726, 3726, 31, 330, 21, 2093, 4966, 326, 135, 8, 29480, 13, 5, 1210, 8, 23795, 6, 26, 21, 2272, 5737, 9, 14, 2093, 8, 23795,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 write a class statement for a database === In vb: db = New DBDataContext(c:\path\db.mdf) How do I write a class statement to declare DBDataContext: Class DBDataContext **what code goes here** End Class
0
[ 2, 184, 107, 31, 2757, 21, 718, 3331, 26, 21, 6018, 800, 3726, 3726, 19, 13, 20468, 45, 13, 9007, 800, 78, 13, 9007, 18768, 1126, 11969, 5, 150, 45, 1, 8353, 1, 9007, 9, 79, 8736, 6, 184, 107, 31, 2757, 21, 718, 3331, 20, 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...
Finding the cause of NaN error === I got stuck with a NaN error in this section of code: void Robot::updatePos(int msTime){ if(vel_left==vel_right){ pos_x-=vel_right*msTime*0.001*sin(orientation); pos_y-=vel_right*msTime*0.001*cos(orientation); } else{ int sign=1; if(vel_left<vel_right) sign=-1; float centre_x, centre_y; float right_rad=width/(vel_left/vel_right-1); centre_x=pos_x-cos(orientation)*(right_rad+width/2); centre_y=pos_y-sin(orientation)*(right_rad+width/2); cout << "centre" << centre_x << "right_rad" << right_rad << endl; orientation+=sign*vel_right*msTime/right_rad; pos_x=centre_x+cos(orientation)*(right_rad+width/2); pos_y=centre_y+sin(orientation)*(right_rad+width/2); } while(orientation>M_PI) orientation-=2*M_PI; while(orientation<-M_PI) orientation+=2*M_PI; cout << "pos_x: " << pos_x << " pos_y: " << pos_y << " orientation: " << orientation << endl; } all the class variables are floats. Do you have any idea what might be causing this error?
1
[ 2, 3007, 14, 1679, 16, 5884, 7019, 800, 3726, 3726, 31, 330, 4549, 29, 21, 5884, 7019, 19, 48, 1050, 16, 1797, 45, 11364, 8288, 45, 45, 576, 8209, 12551, 5, 6391, 4235, 891, 6, 1, 100, 5, 6532, 1, 9742, 3726, 3726, 6532, 1, 41...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SharedPreferences application context vs activity context === I am using several SharedPreferences to store data in my app. Some preferences are used in a lot of activites. I know that the SharedPreferences are internally backed by a map for fast read-access and written to sdcard when settings are changed. I wonder which way is better if a sharedpreference is accessed by a lot of activies: 1. Instantiate it in every activity using the activity context. 2. Instantiate it in every activity, but using the application context. 3. Put it in e.g. the Application class and instantiate it only once there, similar to a singleton. If I use 1. solution is there a sharedpreference object for every activity? And will the sharedpreference's internal map get destroyed when the activity is destroyed? If I use 2. solution will there be only one instance although I call getSharedPreferences in every activity? And will the internal map be in memory as long as the application is alive? Hopefully someone knows how Android handles it internally.
0
[ 2, 2592, 306, 28018, 18, 3010, 4141, 4611, 2358, 4141, 800, 3726, 3726, 31, 589, 568, 238, 2592, 306, 28018, 18, 20, 1718, 1054, 19, 51, 4865, 9, 109, 9808, 18, 50, 147, 19, 21, 865, 16, 13, 19516, 6359, 9, 31, 143, 30, 14, 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...
NameNotFoundException EJB localbinding sometimes found sometimes not === We have Jboss 4.2 and few ears on it. One application has EJB with local and remote binding. Another one use this EJB. All working fine before. But from last week something strange happens - sometimes JNDI lookup can found this EJB but sometimes(in most cases) it get NameNotFoundException. How this can be possible. Where problem can be?
0
[ 2, 204, 1270, 12235, 10066, 872, 13, 10022, 220, 375, 22260, 1030, 216, 1030, 52, 800, 3726, 3726, 95, 57, 487, 10349, 18, 268, 9, 135, 17, 310, 4383, 27, 32, 9, 53, 3010, 63, 13, 10022, 220, 29, 375, 17, 5388, 8728, 9, 226, 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...
Transparent Faced Sphere three.js === i'm trying to do a webGL transparent faced sphere with three.js Test code available here : WebGL Fiddle : http://jsfiddle.net/zbWMv/ I tryed many things, but i can't succed to bring it working. I saw in renderer code that a sort is done for faces rendering, doing opaque first, then transparent in opposite order. So i dont really know what to do next ... Here is the same in canvas2D, which is working good. Canvas 2D Fiddle : http://jsfiddle.net/HHUaF/
0
[ 2, 14862, 3110, 9228, 132, 9, 728, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 107, 21, 2741, 8430, 14862, 3110, 9228, 29, 132, 9, 728, 18, 1289, 1797, 904, 235, 13, 45, 2741, 8430, 12759, 13, 45, 7775, 6903, 728, 18, 1707, 12312,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 wrong with my I2C link? It toggles LEDS when it shouldn't === I have two Lattice chips connected up to my Arduino connected through I2C. The Lattice boards contain 8 LEDs each. My Arduino is the master. My goal is to drive the LEDs on each board. So far it's going well, but there are a few bugs. I begin the process by telling the Lattice board, that I am adressing, I am about to send the pins that I want it to drive. I do this by sending a byte set to 10 for now. Following this I send the pins I want it to drive in a byte like this, 10110111, where index 0 is the first LED and index 1 is the second LED and so on and so on through 8. Verilog code for this: if(adr_match & bit_DATA & data_phase & op_write & getDrive == 1'b1) begin drivePins[bitcnt] <= SDAr; if (bitcnt == 0) begin getDrive = 1'b0; end end if (adr_match & bit_DATA & data_phase & op_write & (IOout == 10) & bitcnt == 0) getDrive = 1'b1; Lastly I send a byte, an 11 that tells the Lattice board that its set and to drive the pins connected to the 8 LEDs. if (adr_match & bit_DATA & data_phase & op_write & IOout == 11 & bitcnt == 0) begin led0 = drivePins[0]; led1 = drivePins[1]; led2 = drivePins[2]; led3 = drivePins[3]; led4 = drivePins[4]; led5 = drivePins[5]; led6 = drivePins[6]; led7 = drivePins[7]; end The rest of the code is based of this implementation for an I2C slave [here](http://www.fpga4fun.com/I2Cslave1.html). My problem is that if I send the drivePins byte from the Arduino, with a 1 in the first index (ex. 0000110 **1**), then it freaks out and turns on LEDs that it shouldn't. The LED pattern ends up looking like this: 11110101, from just this 00000001. So does anyone know what's going on?
0
[ 2, 98, 25, 1389, 29, 51, 31, 135, 150, 3508, 60, 32, 20, 4572, 1355, 481, 18, 76, 32, 5714, 22, 38, 800, 3726, 3726, 31, 57, 81, 18508, 12602, 2587, 71, 20, 51, 13, 1514, 291, 3252, 2587, 120, 31, 135, 150, 9, 14, 18508, 875...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Resizing image using slider in Silverlight === Maybe a stupid question but I inherited the job of developing an image editor which allows the user to add images and then either save what is on the canvas, or save the project's elements etc. to a server and DB to come back to it later. The attributes such as image width and height are sent and called back on load so the image is loaded back where it was on the canvas. Part of the functionality is to re-size images. I am doing this with a slider which has a binding to the image width. The image gets smaller proportionally when I use the slider but the value of the image height nor the image actual height won't change which causes problems when the project is loaded again as the height stored in the db is incorrect. The XAML for the slider area: <TextBlock Grid.Column="0" Grid.Row="0" Text="Width:" VerticalAlignment="Center" FontWeight="Bold" Margin="3" HorizontalAlignment="Left" /> <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="24" Margin="3" /> <TextBlock Grid.Column="2" Grid.Row="0" Text="px" VerticalAlignment="Bottom" Margin="3,0,0,0" /> <TextBlock Grid.Column="0" Grid.Row="1" Text="Height:" VerticalAlignment="Center" FontWeight="Bold" Margin="3" HorizontalAlignment="Left" /> <TextBox x:Name="txtImageHeight" Grid.Column="1" Grid.Row="1" Text="{Binding Path=Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="24" Margin="3" /> <TextBlock Grid.Column="2" Grid.Row="1" Text="px" VerticalAlignment="Bottom" Margin="3,0,0,0" /> <TextBlock Grid.Column="0" Grid.Row="2" Text="Size:" FontWeight="Bold" Margin="3" HorizontalAlignment="Left" VerticalAlignment="Center" /> <Slider Grid.Column="1" Grid.Row="2" Minimum="0" SmallChange=".01" LargeChange=".10" Maximum="{Binding Path=MaxWidth}" Value="{Binding Path=Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="3" Grid.ColumnSpan="2" ValueChanged="Slider_ValueChanged" /> The value in the Height text box obviously doesn't change as I want either. And the code: private void AddImageElement(object param) { bool? gotImage; string fileName; BitmapImage imageSource = GetImageFromLocalMachine(out gotImage, out fileName); if (gotImage == true) { Image image = new Image(); image.Name = fileName; image.Source = imageSource; image.Height = imageSource.PixelHeight; image.Width = imageSource.PixelWidth; image.MaxHeight = imageSource.PixelHeight; image.MaxWidth = imageSource.PixelWidth; image.Cursor = Cursors.Hand; image.Tag = null; AddDraggingBehavior(image); image.MouseLeftButtonUp += element_MouseLeftButtonUp; this.Elements.Add(image); numberOfElements++; this.SelectedElement = image; this.SelectedImageElement = image; } } How do I get the height value to reflect the height that the image is rendered as? I'm completely new to Silverlight and .NET so maybe I'm missing something obvious
0
[ 2, 10719, 3335, 1961, 568, 3295, 106, 19, 1172, 3130, 800, 3726, 3726, 913, 21, 3553, 1301, 47, 31, 7179, 14, 1205, 16, 3561, 40, 1961, 1835, 56, 2965, 14, 4155, 20, 3547, 3502, 17, 94, 694, 2079, 98, 25, 27, 14, 9696, 15, 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...
what is correct and secure vay to pass url through ul === I want to pass url (or even several urls) through url, i.e. use url like `http://domain/file.php?url1=...&url2=...`. The question is how to make such urls safe and working. Will `urlencode()` help. BTW, if I do `urlencode($url)`, do I need to `urldecode()` before doing `header("Location: $url")` Thank you in advance!
0
[ 2, 98, 25, 4456, 17, 4315, 13, 24105, 20, 1477, 287, 6362, 120, 13, 1287, 800, 3726, 3726, 31, 259, 20, 1477, 287, 6362, 13, 5, 248, 166, 238, 13, 911, 7532, 6, 120, 287, 6362, 15, 31, 9, 62, 9, 275, 287, 6362, 101, 13, 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...
how to get utc offset in linux using c++ === I was using following code segment to calculate utc offset, but I realize sometimes it's returning wrong results: double DateTime::getUTCOffset() { time_t currtime; struct tm * timeinfo; time ( &currtime ); timeinfo = gmtime ( &currtime ); time_t utc = mktime( timeinfo ); timeinfo = localtime ( &currtime ); time_t local = mktime( timeinfo ); // Get offset in hours from UTC double offsetFromUTC = ((difftime(local, utc) / HOUR_IN_SECONDS) ); // Adjust for DST if (timeinfo->tm_isdst) { offsetFromUTC += 1; } return offsetFromUTC; } %90 of the time it's correct though, what's the best way of calculating utc offset?
0
[ 2, 184, 20, 164, 13, 11440, 17493, 19, 13024, 568, 272, 20512, 800, 3726, 3726, 31, 23, 568, 249, 1797, 5631, 20, 18469, 13, 11440, 17493, 15, 47, 31, 4007, 1030, 32, 22, 18, 2485, 1389, 1736, 45, 1494, 1231, 891, 45, 45, 3060, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
is this possible with variadic templates? === I was thinking to do something like : template<typename ...T> struct foo { bar<type_1_of_T_pack>::type var1; bar<type_2_of_T_pack>::type var2; } or more precisely : template<typename ...T> struct foo { Type_1_in_T var1; Type_2_in_T var2; } is it possible to do? no recursion techniue comes to mind to do this . Thanks
0
[ 2, 25, 48, 938, 29, 4033, 549, 4673, 22894, 18, 60, 800, 3726, 3726, 31, 23, 1440, 20, 107, 301, 101, 13, 45, 22894, 1, 4474, 7259, 13, 9, 9, 9, 38, 1, 13, 10346, 4310, 111, 13, 1, 748, 1, 4474, 1, 165, 1, 1041, 1, 38, 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...
Error when deploying MVC 4 app with Ninject to Azure === I have written a MVC 4 application using Visual Studio 2012 RC. It uses Ninject as a dependency injector and it works without any problems on my local machine using Azure Emulator. The application targets .NET 4.0. However, when I deploy it to the Azure as a Web Role I am getting this Exception: [MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +117 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +247 System.Activator.CreateInstance(Type type, Boolean nonPublic) +106 System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +84 [InvalidOperationException: An error occurred when trying to create a controller of type 'Poller.WebUI.Controllers.QuestionsController'. Make sure that the controller has a parameterless public constructor.] System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +247 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +85 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +270 System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +66 System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +19 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +161 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +405 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375 I don't want to add parameterless constructor to the QuestionsController, because I need DB repository there, which is passed as a constructor parameter. This parameter should be correctly filled by Ninject. Does anybody has any idea what could possibly be a problem here?
0
[ 2, 7019, 76, 17617, 68, 307, 8990, 268, 4865, 29, 13, 5703, 17759, 20, 25715, 800, 3726, 3726, 31, 57, 642, 21, 307, 8990, 268, 3010, 568, 3458, 1120, 563, 16462, 9, 32, 2027, 13, 5703, 17759, 28, 21, 26835, 20316, 248, 17, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Table Layout separation === In my application i am showing one table layout.Please refer this image "www.freeimagehosting.net/q9zrj".This is my output. In that row is divied ,now i want is to have a vertical division in to 2 halves.Is it possible to have in table layout.Help me.thanks in advance. My table xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:paddingTop="4dip" android:paddingBottom="6dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" > <TableLayout android:id="@+id/tablelayout" android:layout_height="wrap_content" android:layout_width="fill_parent" android:paddingRight="2dip" android:stretchColumns="4" > <TableRow> <TextView android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:text="Income" > </TextView> <TextView android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:text="Expense" > </TextView> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:padding="2dip" android:background="#FF909090" /> </TableRow> <TableRow android:id="@+id/tablerowhouse" android:layout_marginTop="30px" > <TextView android:id="@+id/text40" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Household:" > </TextView> <TextView android:id="@+id/houseinctot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Household:" android:gravity="right" > </TextView> <TextView android:id="@+id/text41" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Household:" > </TextView> <TextView android:id="@+id/houseexptot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="Household:" > </TextView> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:padding="2dip" android:background="#FF909090" /> </TableRow> <TableRow android:layout_marginTop="30px" > <TextView android:id="@+id/text42" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Travel:" > </TextView> <TextView android:id="@+id/trlinctot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="Travel" > </TextView> <TextView android:id="@+id/text43" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Travel:" > </TextView> <TextView android:id="@+id/trlexptot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="Travel:" > </TextView> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:background="#FF909090" android:padding="2dip" /> </TableRow> <TableRow android:layout_marginTop="30px" > <TextView android:id="@+id/text44" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Education:" > </TextView> <TextView android:id="@+id/eduinctot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="Education" > </TextView> <TextView android:id="@+id/text45" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Education:" > </TextView> <TextView android:id="@+id/eduexptot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="Education:" > </TextView> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:background="#FF909090" android:padding="2dip" /> </TableRow> <TableRow android:layout_marginTop="30px" > <TextView android:id="@+id/text46" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Group4:" > </TextView> <TextView android:id="@+id/grp4inctot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="group4" > </TextView> <TextView android:id="@+id/text47" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Group4:" > </TextView> <TextView android:id="@+id/grp4exptot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="group4:" > </TextView> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:background="#FF909090" android:padding="2dip" /> </TableRow> <TableRow android:layout_marginTop="30px" > <TextView android:id="@+id/text48" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Group5:" > </TextView> <TextView android:id="@+id/grp5inctot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="group5" > </TextView> <TextView android:id="@+id/text49" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Group5:" > </TextView> <TextView android:id="@+id/grp5exptot" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="group5:" > </TextView> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" > <View android:id="@+id/line1" android:layout_width="wrap_content" android:layout_height="1dip" android:layout_weight="1" android:background="#FF909090" android:padding="2dip" /> </TableRow> <TableRow android:layout_marginTop="40px"> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Total:" > </TextView> <TextView android:id="@+id/totincome" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="total" > </TextView> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Total:" > </TextView> <TextView android:id="@+id/totexpense" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="total:" > </TextView> </TableRow> <TableRow android:layout_marginTop="40px"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Balance:" android:layout_span="6" android:layout_marginLeft="100dp" > </TextView> <TextView android:id="@+id/balance" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="balance" android:layout_marginLeft="-150dp" > </TextView> </TableRow> </TableLayout> </LinearLayout>
0
[ 2, 859, 9106, 8312, 800, 3726, 3726, 19, 51, 3010, 31, 589, 3187, 53, 859, 9106, 9, 6744, 5017, 48, 1961, 13, 7, 6483, 9, 4639, 22039, 11694, 68, 9, 2328, 118, 1251, 518, 380, 23008, 7, 9, 1565, 25, 51, 5196, 9, 19, 30, 3131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 jquery array/object to function that expects a MS Ajax object === I've a big project where there still exist some MS ajax functions used all over the project. I could rewrite them using jquery but for now that would take to much time. However we now using jquery for every new functionality. Take a look at this: $.each($("a[xonclick]"), function (index, value) { EnableButton(value); }); function EnableButton(btn) { ... var xonclick = btn.getAttribute("xonclick"); ... } Off course i get the javascript error: getAttribute is not a function I know i could use `btn.attr("xonclick");` but that's not an option as i mentioned before. Is there some jquery function that gives me a MS ajax object for a jquery object? I could then use that object and pass it to the enableButton function. I hope i explained it well and someone of you knows a solution for this. Thanks!
0
[ 2, 184, 20, 1477, 487, 8190, 93, 7718, 118, 23793, 20, 1990, 30, 4186, 18, 21, 4235, 20624, 3095, 800, 3726, 3726, 31, 22, 195, 21, 580, 669, 113, 80, 174, 3182, 109, 4235, 20624, 3719, 147, 65, 84, 14, 669, 9, 31, 110, 27891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 set the value of a text HTML input field by using JQuery? === There is a HTML element of type `text` whose name is fiche_tache_ref. Inside a `javascript` file (.js) outside of the page's folder I want to set its value : function changerNatureRefTache(nature_tache_id) { var http_ajax = $('#http_ajax').val(); var html = $.ajax({ data: "nature_tache_id="+nature_tache_id , type: "POST", url: http_ajax+"referentiel/AjaxTacheChangerNatureTache.php" , async: false }).responseText; // here I want to set the value of the field } Code of AjaxTacheChangerNatureTache.php is : <?php if (isset($_POST['nature_tache_id'])) { define("ROOT_PATH", "../../"); require_once ROOT_PATH . 'config.inc.php'; require_once RP_MODELS . 'nature_tache.class.php'; $db = new DbConn(); $obj = new nature_tache($db->getInstance()); $ret = $obj->recupererNatureTache($_POST['nature_tache_id']); $code = $ret['nat_code']; echo $code; } ?> So how to set the value of the field using `JQuery` ?
0
[ 2, 184, 20, 309, 14, 1923, 16, 21, 1854, 13, 15895, 6367, 575, 34, 568, 487, 8190, 93, 60, 800, 3726, 3726, 80, 25, 21, 13, 15895, 4520, 16, 1001, 13, 1, 11969, 1, 1196, 204, 25, 398, 17425, 1, 38, 9616, 1, 14057, 9, 572, 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...
Dishttp://stackoverflow.com/tance between cameras in stereopair === How i can determine best distance between two cameras in stereopair to take output in pointcloud with opencv (for square in the city)?
0
[ 2, 1460, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 38, 2416, 128, 8688, 19, 10994, 306, 2642, 800, 3726, 3726, 184, 31, 92, 3746, 246, 1583, 128, 81, 8688, 19, 10994, 306, 2642, 20, 247, 5196, 19, 454, 19174, 29, 368, 12732, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
how to remove/kill/delete windows service completly from OS? === <p>Hi i have prepared a windows service which setup on server by batch file (.bat file). Also i can remove it from system completely after running Uninstall.bat There is no myservice on Services.Every thing is look good. </p> ![enter image description here][1] after clicking Setup.exe , error message appears: Error 1001 The specified service already exists: ![enter image description here][2] How to remove old windows service from my os completely. Or how to solve this setup problem. My uninstall.bat exe working good. [1]: http://i.stack.imgur.com/2ueHJ.png [2]: http://i.stack.imgur.com/OPVnD.png
0
[ 2, 184, 20, 4681, 118, 7577, 118, 24249, 591, 1936, 365, 6479, 1336, 102, 37, 13, 759, 60, 800, 3726, 3726, 13, 1, 306, 1, 1822, 31, 57, 3268, 21, 1936, 365, 56, 18161, 27, 8128, 34, 13064, 3893, 13, 5, 9, 4900, 3893, 6, 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...
Highcharts: set regular intervals on xaxis === I have a series of data values over time (determined by a count). Data is provided at *n* minute intervals (count x interval); typically the data will be 96 x 15 (96 15minute intervals to give 24 hours). The length of the intervals and the count are both dynamic. The data series can be numerous types of data; it could be in numerous formats like 0.000123 or 1.23 or 198763.0000089675. I would like my xaxis to show time in 1 hour intervals (screen real estate is small, so 2 hour intervals might be whats needed). I have this: xAxis: { type : 'datetime', title: { text: 'Time ('+period+')' }, dateTimeLabelFormats: { minute: '%H:%M', hour: '%H:%M' } } and a series like this: [15999.999999999996,14999.999999999996,15999.999999999996,14999.999999999996,13999.999999999996,15999.999999999996,17999.999999999993,17999.999999999993,16999.999999999993,15999.999999999996,16999.999999999993,14999.999999999996,14999.999999999996,13999.999999999996,14999.999999999996,14999.999999999996,14999.999999999996,14999.999999999996,15999.999999999996,19999.999999999993,23999.999999999993,27999.999999999993,24999.999999999993,22999.999999999993,21999.999999999993,23999.999999999993,29999.999999999993,26999.999999999993,29999.999999999993,31999.999999999993,34999.999999999985,31999.999999999993,31999.999999999993,33999.999999999985,34999.999999999985,32999.999999999985,32999.99999999998,32999.99999999997,32999.99999999997,32999.99999999997,32999.999999999985,32999.999999999985,34999.999999999985,32999.999999999985,32999.999999999985,32999.999999999985,35999.999999999985,32999.999999999985,35999.999999999985,32999.999999999985,33999.999999999985,30999.999999999993,28999.999999999993,31999.999999999993,32999.999999999985,33999.999999999985,30999.999999999993,32999.999999999985,32999.999999999985,30999.999999999993,30999.999999999993,31999.999999999993,31999.999999999993,29999.999999999993,29999.999999999993,30999.999999999993,30999.999999999993,26999.999999999993,25999.999999999993,27999.999999999993,29999.999999999993,27999.999999999993,26999.999999999993,25999.999999999993,26999.999999999993,27999.999999999993,25999.999999999993,28999.999999999993,29999.999999999993,26999.999999999993,24999.999999999993,18999.999999999993,17999.999999999993,16999.999999999993,16999.999999999993,15999.999999999996,16999.999999999993,15999.999999999996,14999.999999999996,15999.999999999996,15999.999999999996,14999.999999999996,14999.999999999996,15999.999999999996,15999.999999999996,14999.999999999996] but the values on the xaxis are: 00:00:00.020 00:00:00.040 00:00:00.020 00:00:00.020 I've poked through the highcharts API but I can't make head nor tails of how it deals with timeseries. How can I tell highcharts to display the time correctly?
0
[ 2, 183, 5433, 38, 18, 45, 309, 1290, 15899, 27, 993, 19676, 800, 3726, 3726, 31, 57, 21, 231, 16, 1054, 4070, 84, 85, 13, 5, 22213, 34, 21, 2468, 6, 9, 1054, 25, 1173, 35, 1637, 103, 2483, 2038, 15899, 13, 5, 16549, 993, 14422...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Inserting Query String Variables in XML using PHP/curl === I'm trying to send some information to our CRM from a form on our site and am getting stuck on inserting the variables into the XML. Here is a simplified version of my code. Notice where I'm trying to insert the $email variable within the XML variable...which is not working. <?php $email = $_GET["email"]; $xml = '<xmlrequest> <details> <emailaddress>$email</emailaddress> <mailinglist>8</mailinglist> <format>html</format> <confirmed>no</confirmed> </details> </xmlrequest> '; $ch = curl_init('http://mysite.com/xml.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); $result = @curl_exec($ch); if ($result === false) { echo "Error performing request"; } else { $xml_doc = simplexml_load_string($result); header( "Location: http://mysite.com/confirmation?email=$email" ) ; //echo 'Status is ', $xml_doc -> status, '<br/>'; if ($xml_doc -> status == 'SUCCESS') { echo 'Data is ', $xml_doc -> data, '<br/>'; } else { echo 'Error is ', $xml_doc -> errormessage, '<br/>'; } } ?> If I just type in an email address value for the API works fine. However, I'm clueless on how to pull this in dynamically from a PHP variable. Any help is greatly appreciated!
0
[ 2, 14692, 68, 25597, 3724, 12157, 19, 23504, 568, 13, 26120, 118, 4734, 255, 800, 3726, 3726, 31, 22, 79, 749, 20, 2660, 109, 676, 20, 318, 6186, 79, 37, 21, 505, 27, 318, 689, 17, 589, 1017, 4549, 27, 14692, 68, 14, 12157, 77, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Breaking my javascript into modules, am I doing this right? === I'm using the javascript module pattern, and have this so far: var APP; if(APP == undefined) { APP = {}; } APP = (function() { var userId = -1; var privateVar = ''; var _init = function($userId) { userId = $userId; }; var _publicMethod = function($id){ privateVar = id; }; return { init = function($userId) { _init($userId); }, publicMethod = function($id) { _publicMethod($id); } }; })(); I then have a common utils module: APP.utils = (function(){ })(); And then per page I am planning on having a module, so I don't wireup events (button clicks etc) for no reason on pages where these DOM elements don't event exist: APP.homePage = (function(){ return { }; })(); So each module will have a init() method that I will call on the page to run things that have to be run (e.g. wiring up events, setting variables like say userId etc): $(document).ready(function() { APP.init(<%= user.id %>); APP.homePage.init('abc'); }); So now if the files get too big, I can break them out into separate files also. 1. What if one module needs to call another, I guess the only way for this to work is to do this via the public api right? e.g. what if homePage needs userId, should I pass that in the homePage#init method? 2. How is my coding style, any obvious style that is not considered best practise? 3. Any comments on this approach? Is it good in general?
0
[ 2, 3892, 51, 8247, 8741, 77, 17113, 15, 589, 31, 845, 48, 193, 60, 800, 3726, 3726, 31, 22, 79, 568, 14, 8247, 8741, 12613, 3732, 15, 17, 57, 48, 86, 463, 45, 4033, 4865, 73, 100, 5, 7753, 800, 3726, 367, 13439, 6, 13, 1, 48...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Add new item to a list created with the ko.mapping plugin for Knockout.js === I am trying to figure out the canonical way to add elements to a list in a model created with ko.mapping. I [created a jsFiddle to tinker][1]: The javascript is something along the lines of the following: var mapping, baseModel, view_model; mapping = { outer: [{ alpha: '', beta: [ { carotine: '', blockers: ''} ] }] }; baseModel = { // add in functionality append_outer: function() { this.outer.push({}); }, append_beta: function(xyz) { this.beta.push({}); } }; view_model = ko.mapping.fromJS(mapping, {}, baseModel); ko.applyBindings(view_model, $("#mapped")[0]);​ The corresponding HTML is [on the jsFiddle][2]. When I use `append_outer` I would expect to have a new element added to the view_model essentially identical to the first element, all with observables. When I use `append_beta` I would expect beta to have a new element with `[carotine: ko.observable(), blockers: ko.observable]`. I have not seen an obvious way to do this - but I would expect it to be a very common use-case. For obvious reasons the sample code is not doing what I desire! It is of course just what I was tinkering in the hopes of finding something obvious, e.g. `ko.mappingCreate` or some such. Alas, no such luck. It is perhaps mentioning that the data model is dynamic - though lists will always have items with data representations identical to that of their peers. One might say that the data used to create the view model (`mapping`) is a prototype. I would be grateful for any thoughts and direction. [1]: http://jsfiddle.net/bmh_ca/Rgj6u/1/ [2]: http://jsfiddle.net/bmh_ca/Rgj6u/1/
0
[ 2, 3547, 78, 9101, 20, 21, 968, 679, 29, 14, 1584, 9, 540, 5574, 10922, 108, 26, 11676, 9, 728, 18, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 14, 5742, 4272, 161, 20, 3547, 2065, 20, 21, 968, 19, 21, 1061, 679, 29, 1584, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Serialize CvKNearest class using Boost Serialization library === Is there a simple way to save a KNN classifier in OpenCV by using the C++ API? I have tried to save a KNN classifier described [here][1] after wrapping CvKNearest class inside another class. It successfully saves to disk, but when I read from it running *predict* method gives me **segmentation fault** (core dumped) error. class KNNWrapper { CvKNearest knn; bool train(Mat& traindata, Mat& trainclasses) { } void test(Mat& testdata, Mat& testclasses) { } } [1]: http://www.functionx.com/cpp/articles/serialization.htm
0
[ 2, 5956, 2952, 13, 12732, 197, 14114, 1430, 718, 568, 10419, 5956, 1829, 1248, 800, 3726, 3726, 25, 80, 21, 1935, 161, 20, 2079, 21, 6209, 103, 718, 16292, 19, 368, 12732, 34, 568, 14, 272, 20512, 21, 2159, 60, 31, 57, 794, 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...
Creating an update script from Oracle TOAD === In Oracle, using TOAD, we are able to create an insert script from a table. However, I need to create an UPDATE script based on the values of each row where the CLIENTID is 'blah blah' Originally, what I did was create an excel spreadsheet with all the necessary data and for each row, I pasted a UPDATE TABLE BLAH BLAH SET COLUMN1 = "xxx", COLUMN2 = '' where CLIENT_ID = "123' ..but I ran into some difficulties with exporting the spreadsheet into a text based DOS file and converting it to n .sql as so to edit but it was messy and unpredictable. Has anyone have a better idea I can implement?
0
[ 2, 2936, 40, 11100, 3884, 37, 15759, 20, 1283, 800, 3726, 3726, 19, 15759, 15, 568, 20, 1283, 15, 95, 50, 777, 20, 1600, 40, 14692, 3884, 37, 21, 859, 9, 207, 15, 31, 376, 20, 1600, 40, 11100, 3884, 432, 27, 14, 4070, 16, 206,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 update an HTML5 indexedDB record? === I have tried to get some information from [W3C][1] regarding the update of an objectStore item in a indexedDB database, but with not so much susccess. I found [here][2] a way to do it, but it doesn't really work for me. My implementation is something like this DBM.activitati.edit = function(id, obj, callback){ var transaction = DBM.db.transaction(["activitati"], IDBTransaction.READ_WRITE); var objectStore = transaction.objectStore("activitati"); var keyRange = IDBKeyRange.only(id); objCursor = objectStore.openCursor(keyRange); objCursor.onsuccess = function(e){ var cursor = e.target.result; console.log(obj); var request = cursor.update(obj); request.onsuccess = function(){ callback(); } request.onerror = function(e){ conosole.log("DBM.activitati.edit -> error " + e); } } objCursor.onerror = function(e){ conosole.log("DBM.activitati.edit -> error " + e); } } I have all DBM.activitati.(add | remove | getAll | getById | getByIndex) methods working, but I can not resolve this. If you know how I can manage it, please, do tell! Thank you! [1]: http://www.w3.org/TR/IndexedDB/ [2]: http://dominoc925.blogspot.ro/2012/06/use-html5-indexeddb-cursors-to-update.html
0
[ 2, 184, 20, 11100, 40, 13, 15895, 264, 4348, 69, 9007, 571, 60, 800, 3726, 3726, 31, 57, 794, 20, 164, 109, 676, 37, 636, 499, 240, 150, 500, 2558, 165, 500, 3467, 14, 11100, 16, 40, 3095, 16828, 9101, 19, 21, 4348, 69, 9007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
-setNeedsDisplay not getting called to refresh drawRect === I have two methods that get called from within -drawRect: - (void)drawRect:(CGRect)rect { if(drawScheduleFlag) { [self drawSchedule]; drawScheduleFlag = false; } else [self drawGrid]; } -drawGrid is called at initialization time. The other method (-drawSchedule) is called from this code, which is on the main thread: - (void) calendarTouched: (CFGregorianDate) selectedDate { // NSLog(@"calendarTouched - currentSelectDate: %d/%d/%d", selectedDate.month, selectedDate.day, selectedDate.year); // NSLog(@"Main thread? %d", [NSThread isMainThread]); // get data from d/b for this date (date, staff name, cust name, time, length, services required) //------ stub ------- scheduledDate.year = 2012; scheduledDate.month = 6; scheduledDate.day = 20; staffName = @"Saori"; custName = @"Brian"; startTime.hour = 11; duration = 2; servicesReqd = @"Nails"; drawScheduleFlag = true; [self setNeedsDisplay]; return; } I know the code is being executed, but nothing happens to draw the schedule. Why is -[self setNeedsDisplay] not causing the -drawRect to be called?
0
[ 2, 13, 8, 3554, 556, 69, 18, 2906, 5438, 52, 1017, 227, 20, 24905, 2003, 14673, 38, 800, 3726, 3726, 31, 57, 81, 3195, 30, 164, 227, 37, 363, 13, 8, 3030, 7127, 11557, 45, 13, 8, 13, 5, 2625, 1340, 6, 3030, 7127, 11557, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 properly use "layout_gravity" for Android UIs? === I want to write a small Android app with a GUI that should display an image on the top of the (portrait) screen, directly below a TextView that might contain some info text (or simply is blank/empty), and at the bottom of the screen a button. So in between the (empty) Textview (below the image on top) and the button should be "maximum" empty space, depending on the screen size of the devive. So, in other words: the group of image and TextView should float on top of the screen, the bottom should float on the bottom of the screen, with a dynamic amount of empty space in between. So I ended up with this layout XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <ImageView android:id="@+id/curr_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|top" android:layout_margin="6dip" /> <TextView android:id="@+id/image_info_text" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:orientation="vertical" > <Button android:id="@+id/button" android:text="@string/rate_button_text" android:layout_width="fill_parent" android:layout_height="60dip" android:layout_gravity="center_horizontal|bottom" android:layout_margin="6dip" /> </LinearLayout> </LinearLayout> However, with this layout everything floats on the top of the screen, the button is not rendered to the bottom of the screen, as described above. Any ideas what I am doing wrong here? Thanks in advance for your help!
0
[ 2, 184, 20, 7428, 275, 13, 7, 4414, 1320, 1, 13265, 856, 7, 26, 13005, 287, 403, 60, 800, 3726, 3726, 31, 259, 20, 2757, 21, 284, 13005, 4865, 29, 21, 9457, 30, 378, 3042, 40, 1961, 27, 14, 371, 16, 14, 13, 5, 26423, 6, 2324...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
All canvas methods that change the canvas image === I'd like to determine a list of all of the methods that have the ability to directly change an HTML5 canvas image. So far my list consists of `fillRect`, `stroke`, `putImageData` but I am sure I am missing some.
0
[ 2, 65, 9696, 3195, 30, 753, 14, 9696, 1961, 800, 3726, 3726, 31, 22, 43, 101, 20, 3746, 21, 968, 16, 65, 16, 14, 3195, 30, 57, 14, 2165, 20, 1703, 753, 40, 13, 15895, 264, 9696, 1961, 9, 86, 463, 51, 968, 2043, 16, 13, 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...
pandas MovingOLS doesn't support NA values? === I am using the pandas.ols function from version 0.7.3. I am interested in doing a moving regression, such as model = pandas.ols(y = realizedData, x = pastData, intercept = 0, window_type="rolling", window = 80, min_periods = 80) The inputs contain data for about 600 dates, of which 15 are NA values. But the output only contains regression results for about 120 dates. The issue is that whenever the window contains even one NA value, there is no output for that window. The problem disappears if I change window_type to "expanding" and I get about 500 output points as expected, but I don't want to do an expanding regression. Can you tell me how to fix this? Thanks, -- Preyas
0
[ 2, 16982, 18, 1219, 1823, 18, 1437, 22, 38, 555, 1775, 4070, 60, 800, 3726, 3726, 31, 589, 568, 14, 16982, 18, 9, 1823, 18, 1990, 37, 615, 713, 9, 465, 9, 240, 9, 31, 589, 3158, 19, 845, 21, 1219, 27369, 15, 145, 28, 1061, 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...
Locating a user using geolocation? === I would like to know what the best way is to get the latitude and longitude of the user visiting my page. And i want it to work in IE as well, so html5 is out of the question :) Thanks
0
[ 2, 27917, 21, 4155, 568, 6389, 19032, 60, 800, 3726, 3726, 31, 83, 101, 20, 143, 98, 14, 246, 161, 25, 20, 164, 14, 16337, 17, 22291, 16, 14, 4155, 4803, 51, 2478, 9, 17, 31, 259, 32, 20, 170, 19, 13, 660, 28, 134, 15, 86, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0...
Best approach to display empty rows for ASP.MVC 3 with EF === I have problem with displaying table with hours and attendance for some all day event. This event allows to signing up attendees for each hour of day. I wonder what is the best approach to display count of attendees for each hour of that day? Problem is with hours which has no attendees signed on. What is the best approach to display this "empty" rows (hours with zero value)? I came to solution, that I can handle this in some stored procedure which will be mapped to some entities used for display only, but I don't like this way very much. What is the best approach for this problem? I am using ASP.MVC 3 with Entity Framework.
0
[ 2, 246, 2141, 20, 3042, 2424, 11295, 26, 28, 306, 9, 79, 8990, 203, 29, 11599, 800, 3726, 3726, 31, 57, 1448, 29, 17418, 859, 29, 974, 17, 3648, 26, 109, 65, 208, 807, 9, 48, 807, 2965, 20, 5479, 71, 22816, 26, 206, 1671, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Knockout.js mapping plugin with require.js === What is the standard way of loading mapping plugin in require.js ? Below is my config.js (require.js config file) require.config({ // Initialize the application with the main application file. deps:["app"], paths:{ // JavaScript folders. libs:"lib", plugins:"lib/plugin", templates:"../templates", // Libraries. jquery:"lib/jquery-1.7.2.min", underscore:"lib/lodash", text:'text', order:'order', knockout:"lib/knockout", knockoutmapping:"lib/plugin/knockout-mapping" }, shim:{ underscore:{ exports:'_' }, knockout:{ deps:["jquery"], exports:"knockout" } } } In my view model define(['knockout', 'knockoutmapping'], function(ko, mapping) { } However, mapping is not bound to ko.mapping. Any pointers/suggestions would be appreciated. Thanks, Ravi
0
[ 2, 11676, 9, 728, 18, 13305, 10922, 108, 29, 4077, 9, 728, 18, 800, 3726, 3726, 98, 25, 14, 1236, 161, 16, 12797, 13305, 10922, 108, 19, 4077, 9, 728, 18, 13, 60, 1021, 25, 51, 13, 14093, 2816, 9, 728, 18, 13, 5, 99, 3003, 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...
Proper approach to dealing with Auto-scaling === I'm working with another developer on a WinForms application, and we are having a big problem with the appearance related to auto scaling. My system (a Sony VAIO) defaults to 125% on this menu: ![Display scaling][1] From what I can tell, 125% sets the DPI to 120, and default font size (menus, etc.) to 11pt. On the other developer's system, his defaults to 100%, which is 96 dpi, and 9pt font. I'm not sure, but I think the only the DPI is what is causing us grief. The problem manifests itself with text being the wrong size, and either covering up other controls, or being way too spaced out (depending on who had it open in designer last). As far as I can tell, all `ContainerControl`s are set to `AutoScaleMode.Inherit`, and the top-level form is `AutoScaleMode.Dpi`. Is this what most other people use? [1]: http://i.stack.imgur.com/vYHRf.png
0
[ 2, 4119, 2141, 20, 5746, 29, 3108, 8, 18, 3430, 68, 800, 3726, 3726, 31, 22, 79, 638, 29, 226, 10058, 27, 21, 628, 4190, 18, 3010, 15, 17, 95, 50, 452, 21, 580, 1448, 29, 14, 1468, 1597, 20, 3108, 26829, 9, 51, 329, 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...
Capturing a program window with BitBlt always returns the same image === I wrote the following code (C++ Win32) to capture a game window screen and get pixel color array from the image. Function autoB() does the job. Then I draw the result array into my window to visually check what I got. The problem is that this program works only once after I start the computer, after the first time it "caches" the first screenshot taken from the game and I always get the same array of pixels. Even if I close and restart the program I get the same screenshot. The game is not using DirectX to draw on the screen and I'm always able to take screenshots using Alt+PrtSc. Any help in understanding why it's happening this way is appreciated. int getPixels(HDC *eClientHdcMem, HBITMAP *eClientBmp, unsigned char **lp) { BITMAP bmpScreen; BITMAPINFOHEADER bi; GetObject(*eClientBmp, sizeof(BITMAP), &bmpScreen); LONG bW = bmpScreen.bmWidth, bH = bmpScreen.bmHeight; bi.biSize = sizeof(BITMAPINFOHEADER); bi.biWidth = bW; bi.biHeight = -bH; bi.biPlanes = 1; bi.biBitCount = 32; bi.biCompression = BI_RGB; bi.biSizeImage = 0; bi.biXPelsPerMeter = 0; bi.biYPelsPerMeter = 0; bi.biClrUsed = 0; bi.biClrImportant = 0; DWORD dw = ((bW * bi.biBitCount + 31) / 32) * 4 * bH; *lp = new unsigned char[dw]; return GetDIBits(*eClientHdcMem, *eClientBmp, 0, (UINT)bH, *lp, (BITMAPINFO *)&bi, DIB_RGB_COLORS); } void autoB() { HWND hwnd; HDC hDC0 = NULL, eClientHdcMem = NULL; HBITMAP eClientBmp = NULL; BITMAP bmp = {0}; unsigned char *lp = NULL, *sp = NULL; WINDOWINFO wi; wi.cbSize = sizeof(WINDOWINFO); RECT vp; int vpW, vpH; long iW, iH; if (!(hwnd = FindWindow(NULL,TEXT("Client")))) return; if (!(hDC0 = GetDC(hwnd))) return; GetWindowInfo(hwnd,&wi); vp = wi.rcClient; vpW = vp.right - vp.left; vpH = vp.bottom - vp.top; if (!(eClientBmp = CreateCompatibleBitmap(hDC0, vpW, vpH))) return; if (!(eClientHdcMem = CreateCompatibleDC(hDC0))) return; SelectObject(eClientHdcMem, eClientBmp); BitBlt(eClientHdcMem, 0, 0, vpW, vpH, hDC0, 0, 0, SRCCOPY); int res = getPixels(&eClientHdcMem, &eClientBmp, &lp); DeleteObject(eClientBmp); DeleteObject(eClientHdcMem); // begin testing HDC sts = GetDC(hStats); HBITMAP stsBmp = CreateCompatibleBitmap(sts, vpW, vpH); HBITMAP stsBmpOld = (HBITMAP)SelectObject(sts, stsBmp); unsigned char r,g,b; for(unsigned int i=0;i<vpW;i++) { for(unsigned int j=0;j<vpH;j++) { r = lp[(vpW*j+i) * 4 + 2]; g = lp[(vpW*j+i) * 4 + 1]; b = lp[(vpW*j+i) * 4 + 0]; SetPixel(sts,i,j,RGB(r,g,b)); } } SelectObject(sts, stsBmpOld); DeleteObject(stsBmp); DeleteObject(stsBmpOld); ReleaseDC(hStats,sts); // end testing DeleteDC(eClientHdcMem); ReleaseDC(hwnd,hDC0); delete [] lp; lp = NULL; delete [] sp; sp = NULL; }
0
[ 2, 12859, 21, 625, 1463, 29, 1142, 6287, 38, 550, 4815, 14, 205, 1961, 800, 3726, 3726, 31, 738, 14, 249, 1797, 13, 5, 150, 20512, 628, 3125, 6, 20, 3683, 21, 250, 1463, 2324, 17, 164, 18146, 1665, 7718, 37, 14, 1961, 9, 1990, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Getting Coldfusion Complex Objects error but don't have a complex object === Can anyone spot the error here? It's driving me batty. I'm getting "Complex object types cannot be converted to simple values. " locationId and/or operatorId is sent via url and is always a simple number ('304'). Here's the code for the query: select * from table1, table2 where table1.u_construct_id(+)=table2.u_construct_id and table1.LOCATION_ID = #locationId# and table1.OPERATOR_ID = #operatorId#
0
[ 2, 1017, 1191, 9818, 1502, 3916, 7019, 47, 221, 22, 38, 57, 21, 1502, 3095, 800, 3726, 3726, 92, 1276, 1999, 14, 7019, 235, 60, 32, 22, 18, 2891, 55, 17310, 93, 9, 31, 22, 79, 1017, 13, 7, 960, 11326, 3095, 2551, 1967, 44, 349...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
std vector C++ -- deep or shallow copy === I wonder whether copying a vector<int> I am copying the vector with its values (whereas this is not working with array, and deep copy need a loop or memcpy). Could you hint to an explanation? Regards
0
[ 2, 354, 43, 7497, 272, 20512, 13, 8, 8, 855, 54, 7258, 4344, 800, 3726, 3726, 31, 2666, 1472, 4344, 68, 21, 7497, 1, 6391, 1, 31, 589, 4344, 68, 14, 7497, 29, 82, 4070, 13, 5, 2798, 472, 48, 25, 52, 638, 29, 7718, 15, 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...
How to implement "instanceOf" in JSTL === or say get class name or get type name so that can work on major popular web container/servers? Thank you.
0
[ 2, 184, 20, 8713, 13, 7, 108, 384, 2416, 1041, 7, 19, 487, 18, 7786, 800, 3726, 3726, 54, 395, 164, 718, 204, 54, 164, 1001, 204, 86, 30, 92, 170, 27, 394, 844, 2741, 12147, 118, 10321, 445, 60, 3531, 42, 9, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
In (reduce f val coll), is the val an accumulator? === When you call *reduce* and pass it a function and two arguments, can the first argument be considered to be an accumulator? Is it *always* an accumulator? Is it *sometimes* an accumulator? I was reading a blog entry about using Clojure to parse big files and found this line: (reduce line-func line-acc (line-seq rdr)) Link to the blog entry: http://lethain.com/reading-file-in-clojure/ What about a simple: *(reduce + [1 2 3])*? Is there an accumulator involved? I take it my question boils do to: *"What is exactly an accumulator?"* But I'd still like to understand too the relation between an accumulator and the *reduce* function. So any answer to these specific (related) questions are most welcome!
0
[ 2, 19, 13, 5, 99, 16041, 398, 3347, 9470, 6, 15, 25, 14, 3347, 40, 7602, 723, 14868, 60, 800, 3726, 3726, 76, 42, 645, 1637, 99, 16041, 2483, 17, 1477, 32, 21, 1990, 17, 81, 10553, 15, 92, 14, 64, 5476, 44, 724, 20, 44, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
AccessViolationException was unhandled in EMGU CV === I always get this error when I run my program... ![enter image description here][1] i'm not sure about what's wrong with my program, FYI, actually my program consist of many image processing algorithm's such as - viola-jones, haarcascade for hand detection - camshift + kalman filter for hand tracking - convex hull and convexity defects for counting finger - and other preprocessing .... I have no idea whether these process triggering the error or not... but when I remove convexhull / convexity defects, the errors gone... any solution? thanks [1]: http://i.stack.imgur.com/KEOaf.png
0
[ 2, 1381, 13327, 10832, 10066, 872, 23, 367, 3203, 1294, 19, 3579, 3073, 13, 12732, 800, 3726, 3726, 31, 550, 164, 48, 7019, 76, 31, 485, 51, 625, 9, 9, 9, 13, 187, 2558, 13679, 1961, 5318, 235, 500, 2558, 165, 500, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Android tutorial for work Experience === I have a work experience kid here tomorrow. And basically, I'd like to sit him down with some half complete tasks, and let him finish them off. As of current, he has **no programming experience**. He just choose a random company to see what it is like. I think building on one app is best. Unless it meets a point of overcrowding. Or anyone has other great ideas. **So far:** 1. Ive made a calculator. It adds two simple fields together. At the moment it only takes the value from one, and places 0 in the result box when a button is pressed. (He needs to take the other value and add it on, and place into result). So the code he requires is there. 3. Using 1, He needs to add validation before parsing the value, so no errors occur. 4. One of the boxes is set to wrap_content, not match_parent like the rest. He needs to figure how to change it. 4. He could potentially add his own box and multiply 3 values together.. 5. Maybe add an image to the screen. 6. Round the numbers to 2 S.F. 7. Allow Decimal places. **What I want from it:** 1. Easy to complete 2. Easy to explain. 3. And can keep him entertained for 2+ hours. 4. Involve some programming logic like `or`, `if` `and`. 5. Him to be able to go away, with the experience "WOW I made an android App!!!" Ive another that lets you draw on the screen. (Fun ?) Not sure what I can make him do with it... I'm not sure if this is ideal place for this question, but it is programming related. :)
1
[ 2, 13005, 29724, 26, 170, 1496, 800, 3726, 3726, 31, 57, 21, 170, 1496, 2717, 235, 3450, 9, 17, 11374, 15, 31, 22, 43, 101, 20, 2066, 61, 125, 29, 109, 519, 1279, 8674, 15, 17, 408, 61, 2106, 105, 168, 9, 28, 16, 866, 15, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Tabulating multiple response questions === Imagine that I have a question for which there are four options, and a respondent can select zero or any combination of the four. The variables are named `A`, `B`, `C`, and `D` and the responses are stored in a data.frame as below. set.seed(1) dat = data.frame(A = sample(c(0, 1), 20, replace=TRUE), B = sample(c(0, 1), 20, replace=TRUE), C = sample(c(0, 1), 20, replace=TRUE), D = sample(c(0, 1), 20, replace=TRUE)) I can tabulate the combination of responses (for example, how many responded with `A` alone, or `A`+`B`, or `C`+`D`, and so on) by doing the following: data.frame(table(dat)) # A B C D Freq # 1 0 0 0 0 2 # 2 1 0 0 0 2 # 3 0 1 0 0 0 # 4 1 1 0 0 1 # 5 0 0 1 0 1 # 6 1 0 1 0 3 # 7 0 1 1 0 0 # 8 1 1 1 0 2 # 9 0 0 0 1 0 # 10 1 0 0 1 2 # 11 0 1 0 1 1 # 12 1 1 0 1 1 # 13 0 0 1 1 2 # 14 1 0 1 1 0 # 15 0 1 1 1 3 # 16 1 1 1 1 0 I would like to now create a new column that shows the letter combination that is being represented by this output. For example, row 4 represents the count of `A`+`B` responses, and row 14 represents the count of `A`+`C`+`D` responses. I think that one of the `apply` functions would be useful here, but I'm not sure how to proceed.
0
[ 2, 6523, 10038, 1886, 1627, 2346, 800, 3726, 3726, 4382, 30, 31, 57, 21, 1301, 26, 56, 80, 50, 222, 6368, 15, 17, 21, 4590, 2291, 92, 5407, 4606, 54, 186, 3733, 16, 14, 222, 9, 14, 12157, 50, 377, 13, 1, 58, 1, 15, 13, 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# WPF SQL Server Express local db ObjectContext.CreateDatabase yields error 26 === I've created a WPF app that utilizes SQL Server 2008 Express R2 as a back end. Using EF, I build my database by issuing a Objectcontext.CreateDatabase() method. This method (on some workstations) results in a SQL Server Error 26 - Error Locating Server/Instance Specified. My installation routine verifies the SQL Server Express dependency and installs accordingly. My SQL Server Express default instance (.\SQLEXPRESS) is my target instance and is local to the machine running my app. I'm able to login using SQL Server Management Studio using Windows Authentication and a server name of: (local)\SQLEXPRESS, .\SQLEXPRESS, and CLASS8\SQLEXPRESS All of these instance names work with SSMS, and I can issue commands inside SSMS with no issues. However, my app fails with error 26. This setup works on my development workstation (Win 7 Pro), but fails in a VirtualBox running Win 7 Pro. I've gone through all the SQL Server settings and *think* I've got them configured identically. The Windows Firewall has been disabled on my VirtualBox VM that is suffering this issue, so it shouldn't be a UDP packet being blocked... What could be the cause of my problem?
0
[ 2, 272, 5910, 619, 7721, 4444, 255, 8128, 2999, 375, 13, 9007, 3095, 1126, 11969, 9, 18475, 4375, 8436, 18733, 7019, 1262, 800, 3726, 3726, 31, 22, 195, 679, 21, 619, 7721, 4865, 30, 13151, 18, 4444, 255, 8128, 570, 2999, 761, 135, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Display source of PHP of files === Im working on an upload script, and i want a user to be able to upload any file. I had it al working on localhost, i added php_flag engine off AddType text/plain php html shtml php5 php4 php3 cgi asp aspx xml to my htaccess in the upload folder, and it showed the source of PHP, html and all other files. Exactly as i wanted to. Now i tried to upload it to a real webserver, and unfortunately my host does not allow such .htaccess files. I tried openinging the files with file_get_content() and fopen() and giving them a text/plain header.. but nothing works. It first executes the scripts and shows the output in my textarea. Do you guys have any suggestions on how i can fix this without .htaccess ? Thanks!
0
[ 2, 3042, 1267, 16, 13, 26120, 16, 6488, 800, 3726, 3726, 797, 638, 27, 40, 71, 8294, 3884, 15, 17, 31, 259, 21, 4155, 20, 44, 777, 20, 71, 8294, 186, 3893, 9, 31, 41, 32, 493, 638, 27, 375, 11694, 15, 31, 905, 13, 26120, 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...
Ordering data inside aggregate function === The time is not sorted inside aggregate function in this query: select id, aggregate(time) from (select * from table order by time) as foo group by something; How can I sort by column inside group by expression?
0
[ 2, 15775, 1054, 572, 8544, 1990, 800, 3726, 3726, 14, 85, 25, 52, 22554, 572, 8544, 1990, 19, 48, 25597, 45, 5407, 4924, 15, 8544, 5, 891, 6, 37, 13, 5, 18, 16964, 1637, 37, 859, 389, 34, 85, 6, 28, 4310, 111, 214, 34, 301, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
how to return a string from a function in Jqury as aParemeter to the other jqury function? === I have a small issue ,I need to pass the value of string from function A to function B ,which will take it as argument and use it. I have tried the following but its not working. // first function (A) $("a#SayHello").click(function (e) { e.preventDefault(); var x = function () { var dt = '{"ProductID": "' + $("input#ProductID").val() + '" , "AffiliationURL": "' + $("input#AffiliationURL").val() + '" , "Quantitiy": "' + $("input#Quantitiy").val() + '" , "PricePerUnit": "' + $("input#PricePerUnit").val() + '" , "commissionAmount": "' + $("input#commissionAmount").val() + '"}'; return dt.toString(); }; alert(x); $.B(x); }); // second function function B(dt) { $.ajax({ type: 'POST', data: dt, url: 'http://localhost:4528/WebSite1/WebService.asmx/InsertCommissionRecord', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (data, textStatus, XMLHttpRequest) { alert(data.d); alert(XMLHttpRequest); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }; }); any help would be much appreciable Thanks in advance.
0
[ 2, 184, 20, 788, 21, 3724, 37, 21, 1990, 19, 487, 5495, 622, 28, 21, 1060, 99, 7307, 20, 14, 89, 487, 5495, 622, 1990, 60, 800, 3726, 3726, 31, 57, 21, 284, 1513, 13, 15, 49, 376, 20, 1477, 14, 1923, 16, 3724, 37, 1990, 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...
jQueryMobile How to attach the "recorded" file to the mail in phone gap app === I have implemented an app for **iphone and android in Phone Gap using jQuery Mobile.** in the app app have 2 button **1.Record Voice** and **2. Send Voice As mail**. I implemented Record function using [Capture Audio in Phone Gap][1] and call this function for the button 1 click event. Record function works. Implemented Send mail using EmailComposer plugin for iphone and Webintent for android. mail compose works fine without attachment. ***Now i need to attach that recored voice file as attachment to the mail how?*** // ********Record voice functionS********** // Called when capture operation is finished // function captureSuccess(mediaFiles) { var i, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { uploadFile(mediaFiles[i]); } } // Called if something bad happens. // function captureError(error) { var msg = 'An error occurred during capture: ' + error.code; navigator.notification.alert(msg, null, 'Uh oh!'); } // A button will call this function // function captureAudio() { // Launch device audio recording application, allowing user to capture up to 2 audio clips navigator.device.capture.captureAudio(captureSuccess, captureError, {limit: 2}); } // Upload files to server function uploadFile(mediaFile) { var ft = new FileTransfer(), recordingPath = mediaFile.fullPath, name = mediaFile.name; console.log('Path is: ' + recordingPath); ft.upload(recordingPath, "http://my.domain.com/upload.php", function(result) { console.log('Upload success: ' + result.responseCode); console.log(result.bytesSent + ' bytes sent'); }, function(error) { console.log('Error uploading file ' + recordingPath + ': ' + error.code); }, { fileName: name }); alert(recordingPath); } **Mail Function:** function SendEmail(subject, body, toaddress, html, attachfilename) { window.plugins.emailComposer.showEmailComposer(subject,body,toaddress,"", "",false,attachfilename); } function SendVoiceAsMail() { SendEmail( "Subject", "body", "mymail@gmail.com, false); } Thanks in advance.... [1]: http://docs.phonegap.com/en/1.0.0/phonegap_media_capture_capture.md.html#CaptureAudioOptions
0
[ 2, 487, 8190, 93, 12571, 184, 20, 19514, 14, 13, 7, 12538, 7, 3893, 20, 14, 4216, 19, 1132, 4127, 4865, 800, 3726, 3726, 31, 57, 6807, 40, 4865, 26, 13, 1409, 49, 7709, 17, 13005, 19, 1132, 4127, 568, 487, 8190, 93, 3241, 9, 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...
button_to using GET method === I am working through Agile Web Development with Rails 4th Edition (Rails 3.2+) and I am somewhat confused by the button_to method. The book as well as every other google search I have done says the button_to uses a POST request. However, when I inspect the page, the button_to appears to be using a GET method. Now, I could have this wrong, but I come from a php background and a POST method always meant that the data was being passed to the server without the url and accessed through an array server side: $_POST['form_item'] Furthermore, a GET request meant passing data through the url: someurl.com/somepage?DATA=data_value Using this button_to code: <%= button_to 'Add to Cart', line_items_path(product_id: product_id) %> This becomes the form output: <form action="/line_items?product_id=4" class="button_to" method="post"> <div> <input type="submit" value="Add to Cart" /> <input name="authenticity_token" type="hidden" value="vGT1scGqasbQAMxYwofXHCM62MfSyM/pNty69Ep5t38=" /> </div> </form> the action on this form appears to be passing data through the url (?product_id=4). Although I can clearly see the "method='post'", isnt this a using GET?
0
[ 2, 5167, 1, 262, 568, 164, 2109, 800, 3726, 3726, 31, 589, 638, 120, 27475, 2741, 522, 29, 2240, 18, 268, 96, 1322, 13, 5, 7301, 18, 203, 9, 21812, 6, 17, 31, 589, 4131, 4230, 34, 14, 5167, 1, 262, 2109, 9, 14, 360, 28, 134,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Extract chunks from video file in android === I want to extract some portion of video when user is playing that video via my application. While playing a video user can give start and end duration to cut the video. so are there any way to cut the video based on duration and save to sd card ?
0
[ 2, 10962, 15009, 18, 37, 763, 3893, 19, 13005, 800, 3726, 3726, 31, 259, 20, 10962, 109, 2980, 16, 763, 76, 4155, 25, 791, 30, 763, 1197, 51, 3010, 9, 133, 791, 21, 763, 4155, 92, 590, 799, 17, 241, 9403, 20, 1077, 14, 763, 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...
Symfony2/Memcahed integration === I followed [this blog post](http://codesauce.com/posts/symfony2-native-php-memcached/) and added memcached to services.yml parameters: memcached.servers: - { host: 127.0.0.1, port: 11211 } services: memcached: class: Memcached calls: - [ addServers, [ %memcached.servers% ]] Then in my controller: $memcached = $this->get('memcached'); Looks very pretty. If I can get past `500 - You have requested a non-existent service "memcached"`! The test code from php connects to memcached without any troubles. Done cache:clear, cleared cache manually - doesn't help. Where should I look?
0
[ 2, 13, 7261, 10229, 93, 9298, 790, 4829, 1307, 69, 8078, 800, 3726, 3726, 31, 709, 636, 1565, 8146, 678, 500, 5, 21127, 6903, 9375, 18, 1346, 1105, 9, 960, 118, 6962, 18, 118, 7261, 10229, 93, 135, 8, 21525, 8, 26120, 8, 790, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
telnet code java from org.apache not working with windows7 === I am using a sample telnet application code using package org.apache.commons.net.telnet.TelnetClient When i run this in XP, telnet session is connected and i can retrieve data from it. But When i run the same jar in Windows7, its failed with below exception. Exception in thread "main" java.lang.NoClassDefFoundError: javax/net/SocketFactory I first used jre7 and then updated both jar and windows7 to jre6, but no positive results Can anybody help me here?
0
[ 2, 6757, 2328, 1797, 8247, 37, 13, 5583, 9, 7738, 2569, 52, 638, 29, 1936, 465, 800, 3726, 3726, 31, 589, 568, 21, 5717, 6757, 2328, 3010, 1797, 568, 6030, 13, 5583, 9, 7738, 2569, 9, 17130, 18, 9, 2328, 9, 3454, 2328, 9, 3454, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Share text/Image on twitter and facebook in android === I have developed my news app and now i have to add share(facebook/twitter)option to share image and text.I have searched lot but not clear how to fulfill my requirement.Actually on share button i have to display edittext and button and whatever we have to share on clicking on share button that should be shared.I have gone through SDK and intent also but not working for my requirement` String twitterUri = "http://m.twitter.com/?status="; String marketUri = "TESTING "; Intent shareOnTwitterIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(twitterUri + marketUri)); startActivity(shareOnTwitterIntent);.
0
[ 2, 1891, 1854, 118, 22039, 27, 10623, 17, 9090, 19, 13005, 800, 3726, 3726, 31, 57, 885, 51, 996, 4865, 17, 130, 31, 57, 20, 3547, 1891, 5, 6413, 5199, 118, 38, 13098, 106, 6, 2594, 3309, 20, 1891, 1961, 17, 1854, 9, 49, 57, 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...
Is there any tool to generate Object Graph on iOS app runtime? === I know there are Class Model tools ([OmniGraffle](http://www.omnigroup.com/products/omnigraffle/), Doxygen) to generate Class model diagrams from the existing Xcode projects. But i'm looking for a tool which generates Object Graph on running iOS app in Simulator or Device.
0
[ 2, 25, 80, 186, 5607, 20, 7920, 3095, 7210, 27, 13, 7760, 4865, 485, 891, 60, 800, 3726, 3726, 31, 143, 80, 50, 718, 1061, 4672, 13, 5, 2558, 2636, 889, 12461, 10812, 500, 5, 21127, 6903, 6483, 9, 2636, 889, 8024, 9, 960, 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...
step by step guide to use the remote debugging feature in Chrome for Android on Windows === I've been looking through out the internet for a serious amount of time now for a working tutorial on how to enable the remote debugging feature which is built in to Chrome for Android, but I just can't get it to work. Step three in [this official guide][1] says nothing to me. I've tried to paste `adb forward tcp:9222 localabstract:chrome_devtools_remote` into cmd, but it just says "adb is not an internal or external command". What am I doing wrong? I do have the Android SDK installed, having installed the packages "Android SDK Tools", "Android SDK Platform-tools", "Google USB Driver" and "Google Web Driver". Please, I need a step-by-step-from-the-very-basics tutorial on how to do this properly. Thank you! [1]: https://developers.google.com/chrome/mobile/docs/debugging
0
[ 2, 1424, 34, 1424, 3378, 20, 275, 14, 5388, 121, 16254, 2762, 1580, 19, 13, 12985, 26, 13005, 27, 1936, 800, 3726, 3726, 31, 22, 195, 74, 699, 120, 70, 14, 2620, 26, 21, 2055, 2006, 16, 85, 130, 26, 21, 638, 29724, 27, 184, 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...
Convert json into class object in c# === Hi i have the following json response,how i convert it into a c# class object { "err_code": "0", "org": "CGK", "des": "SIN", "flight_date": "20120719", "schedule": [ ["W2-888","20120719","20120719","1200","1600","03h00m","737-200","0",[["K","9"],["F","9"],["L","9"],["M","9"],["N","9"],["P","9"],["C","9"],["O","9"]]], ["W2-999","20120719","20120719","1800","2000","01h00m","MD-83","0",[["K","9"],["L","9"],["M","9"],["N","9"]]] ] }
0
[ 2, 8406, 487, 528, 77, 718, 3095, 19, 272, 5910, 800, 3726, 3726, 4148, 31, 57, 14, 249, 487, 528, 1627, 15, 1544, 31, 8406, 32, 77, 21, 272, 5910, 718, 3095, 13, 1, 13, 7, 106, 139, 1, 9375, 7, 45, 13, 7, 387, 7, 15, 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...
Is there any open source Java Library or java source code to simplify boolean expression === Is there any open source Java Library or java source code to simplify Boolean expression like !((A.B+C).(!A+BC)) Where, ! - represents NOT + - represents OR . - represents AND Your help would be greatly appreciated in this regard
0
[ 2, 25, 80, 186, 368, 1267, 8247, 1248, 54, 8247, 1267, 1797, 20, 28257, 9827, 413, 210, 1803, 800, 3726, 3726, 25, 80, 186, 368, 1267, 8247, 1248, 54, 8247, 1267, 1797, 20, 28257, 9827, 413, 210, 1803, 101, 13, 187, 5, 5, 58, 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...
AS3 Chromatic Guitar Tuner Using Microphone === I am trying to make a chromatic guitar tuner in flash using the microphone. I have some source code from a Java Tuner that I am trying to convert over. Once I get past reading the actual data I think I will be fine. I know I need to use the SampleDataEvent.SAMPLE_DATA But I am having trouble converting the source code. Below is the specific java code that reads in the audio. byte[] buffer = new byte[2 * 2400]; int[] a = new int[buffer.length / 2]; int n = -1; while ((n = targetDataLine.read(buffer, 0, buffer.length)) > 0) { value2 = value; for (int k = 0; k < n; k += 2) { value = (short) ((buffer[k] & 0xFF) | ((buffer[k + 1] & 0xFF) << 8)); a[k >> 1] = (int) value; } If anyone can get me started in the right direction I would appreciate it.
0
[ 2, 28, 240, 13, 16691, 1786, 984, 6768, 139, 568, 15403, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 13, 16691, 1786, 984, 6768, 139, 19, 4433, 568, 14, 15403, 9, 31, 57, 109, 1267, 1797, 37, 21, 8247, 6768, 139, 30, 31, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Is this a microsoft VC++ 2010 compiler bug of "new auto(enum_type)" === Enviroment: Microsoft Visual Studio 2010 with SP1 Preminum(10.0.40219.1 SP1Rel), Windows XP SP3 VC10 compiler support auto keyword, but the deduced type related information seems not always correct for enumeration. example: #include <type_traits> enum fruit_t { apple = 100, banana = 200, }; int main() { const auto pa = new auto(banana); const auto pb = new fruit_t(banana); static_assert(std::is_same<decltype(pa), decltype(pb)>::value, "not same!"); delete pb; delete pa; } The code above should have no compiler-time error or runtime error. But what suprising me is that, it compiles ok without any error or warning but, does not run correctly. The debugger tells after exit the main function: **HEAP CORRUPTION DETECTED: after %hs block (#55) at 0x00034878. CRT detected that the application wrote to memory after end of heap buffer.** so I guess that the compiler may have bug in "auto" type deduction. Assembler window below shows that, the requested memeory size in the first "operator new" call is 1 byte, while the second "operator new" 4 bytes. It suggests that the compiler has made a big mistake on the size of deduced type. Did you think this is a compiler bug? And is there any bug fixes from Microsoft? int main() { 004113C0 push ebp 004113C1 mov ebp,esp 004113C3 sub esp,10Ch 004113C9 push ebx 004113CA push esi 004113CB push edi 004113CC lea edi,[ebp-10Ch] 004113D2 mov ecx,43h 004113D7 mov eax,0CCCCCCCCh 004113DC rep stos dword ptr es:[edi] const auto pa = new auto(banana); 004113DE push 1 004113E0 call operator new (411181h) 004113E5 add esp,4 004113E8 mov dword ptr [ebp-104h],eax 004113EE cmp dword ptr [ebp-104h],0 004113F5 je main+51h (411411h) 004113F7 mov eax,dword ptr [ebp-104h] 004113FD mov dword ptr [eax],0C8h 00411403 mov ecx,dword ptr [ebp-104h] 00411409 mov dword ptr [ebp-10Ch],ecx 0041140F jmp main+5Bh (41141Bh) 00411411 mov dword ptr [ebp-10Ch],0 0041141B mov edx,dword ptr [ebp-10Ch] 00411421 mov dword ptr [pa],edx const auto pb = new fruit_t(banana); 00411424 push 4 00411426 call operator new (411181h) 0041142B add esp,4 0041142E mov dword ptr [ebp-0F8h],eax 00411434 cmp dword ptr [ebp-0F8h],0 0041143B je main+97h (411457h) 0041143D mov eax,dword ptr [ebp-0F8h] 00411443 mov dword ptr [eax],0C8h 00411449 mov ecx,dword ptr [ebp-0F8h] 0041144F mov dword ptr [ebp-10Ch],ecx 00411455 jmp main+0A1h (411461h) 00411457 mov dword ptr [ebp-10Ch],0 00411461 mov edx,dword ptr [ebp-10Ch] 00411467 mov dword ptr [pb],edx static_assert(std::is_same<decltype(pa), decltype(pb)>::value, "not same!"); delete pb; 0041146A mov eax,dword ptr [pb] 0041146D mov dword ptr [ebp-0ECh],eax 00411473 mov ecx,dword ptr [ebp-0ECh] 00411479 push ecx 0041147A call operator delete (411087h) 0041147F add esp,4 delete pa; 00411482 mov eax,dword ptr [pa] 00411485 mov dword ptr [ebp-0E0h],eax 0041148B mov ecx,dword ptr [ebp-0E0h] 00411491 push ecx 00411492 call operator delete (411087h) 00411497 add esp,4 }
0
[ 2, 25, 48, 21, 7099, 13, 8990, 20512, 498, 21486, 6256, 16, 13, 7, 2681, 3108, 5, 219, 723, 1, 4474, 6, 7, 800, 3726, 3726, 21314, 661, 1130, 45, 7099, 3458, 1120, 498, 29, 3782, 165, 782, 2160, 723, 5, 1036, 9, 387, 9, 2602, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Parallel control of canon cameras through EDSDK === I've got following problem: I have two EOS550D cameras connected to my pc. In my program I have QThread-based class, that sends commands to cameras. There is no problem in distinguishing two cameras and both can be controlled, but though commands are sent in parallel - second camera start working only after first have focused and done shooting. Is it SDK limitation or am I doing something wrong? I knew, that this task can be done by using two pc's and client\server architecture, but I want to try it on one pc) EDSDK and cameras are initialized in control class, sessions for cameras are managed in thread class objects. Call for thread: void CameraController::testShot() { //some variable checks and path set-ups leftCameraThread->setPath(path1); leftCameraThread->start(); rightCameraThread->setPath(path2); rightCameraThread->start(); } Thread run() function: void CameraControlThread::run() { EdsSendCommand(_camera, kEdsCameraCommand_TakePicture , 0); } EDSDK v2.10
0
[ 2, 3821, 569, 16, 5742, 8688, 120, 13, 69, 18, 43, 197, 800, 3726, 3726, 31, 22, 195, 330, 249, 1448, 45, 31, 57, 81, 13, 3894, 18, 12763, 43, 8688, 2587, 20, 51, 5168, 9, 19, 51, 625, 31, 57, 2593, 96, 10647, 8, 1281, 718, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
create a widget using php for use on external sites === I thought it would be a great idea to let our associated dealers have the opportunity to have this on their own site as a widget. https://www.autopower.no/ ("Effektoversikt" to the right). The "effektoversikt" fetches data from our MySQL database. Once the user finds their car and clicks "søk!" (search) they should be redirected to our page... I'm thinking using `iframe`- or `script`-tags is the solution? could someone point me in the right direction on where to start?
0
[ 2, 1600, 21, 4807, 43, 3060, 568, 13, 26120, 26, 275, 27, 4886, 3259, 800, 3726, 3726, 31, 289, 32, 83, 44, 21, 374, 882, 20, 408, 318, 1598, 19916, 57, 14, 2893, 20, 57, 48, 27, 66, 258, 689, 28, 21, 4807, 43, 3060, 9, 7775...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 locate the accurate postion in pl/sql promptly (ORA-06502: PL/SQL) === I have a select statement which needs to select dozens of column into self-defined variable in my pl/sql. Like as below: `select col1, col2, .... col30 into var1, ... var30 from table where .... ` I encounter the error(ORA-06502: PL/SQL: numeric or value error: character string buffer too small) while executing the sp. The error information only poionts out the first line of select statement. Even if i can figure out that my defined variable is too small to hold the column, it still makes me hard to locate the error-defined variable precisely. This is not an efficient way for me to debug this sp. Is there any better idea, please advise me.
0
[ 2, 184, 20, 12717, 14, 8137, 678, 872, 19, 12443, 118, 18, 22402, 15243, 13, 5, 6055, 8, 387, 13798, 135, 45, 12443, 118, 18, 22402, 6, 800, 3726, 3726, 31, 57, 21, 5407, 3331, 56, 2274, 20, 5407, 10273, 16, 4698, 77, 1119, 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...
How to show the ant task javac compilation errors on console using Eclipse AntRunner === I'm using Elcipse's AntRunner to excute the Ant task. When performing the javac task,if any compilation error occurs, I'm getting the following error messge in the console C:\build.xml:41: Compile failed; see the compiler error output for details. What I need to do for displaying the actual compilation errors on the console? How to I can log the same in a file? . Thanks
0
[ 2, 184, 20, 298, 14, 40, 38, 3005, 8247, 150, 4868, 11908, 27, 8650, 568, 11652, 40, 38, 12993, 800, 3726, 3726, 31, 22, 79, 568, 931, 11526, 870, 22, 18, 40, 38, 12993, 20, 1396, 4118, 62, 14, 40, 38, 3005, 9, 76, 2955, 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...
Forse lint to check translations on exact languages === I get this error: > "preferences_default_reminder_labels" is not translated in cs, de, es, > fr, it, ja, ko, nl, pl, pt, pt-rBR, zh > > Issue: Checks for incomplete translations where not all strings are > translated Id: MissingTranslation But my app need to be translated only in english and russian. How can I tune lint to check only en,ru translations?
0
[ 2, 26, 870, 6294, 38, 20, 2631, 13610, 27, 5340, 2556, 800, 3726, 3726, 31, 164, 48, 7019, 45, 13, 1, 13, 7, 306, 28018, 18, 1, 13862, 9708, 1, 99, 79, 19720, 1, 21018, 18, 7, 25, 52, 4331, 19, 272, 18, 15, 121, 15, 13, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SELECT * FROM table WHERE row IN ('list') === I'm having trouble with the code below, it's giving me a syntax error and I can't find anything in the manual or online about it. What are your thoughts on how I could get this to run? 1st Attempt: <?php require("../dbpass.php"); $types = array('Buyer','Seller','Buyer / Seller','Investor'); $typeslist = implode ("','", $types); $sql = "SELECT * FROM contacts WHERE contacttype IN ('$typeslist') AND status = 'New' ORDER BY date DESC"; $result = mysqli_query($mysqli,$sql) or die ("Error: ".mysqli_error($mysqli)); while ($row = mysqli_fetch_array($result)); { 2nd Attempt (put an "=" after "IN"): <?php require("../dbpass.php"); $types = array('Buyer','Seller','Buyer / Seller','Investor'); $typeslist = implode ("','", $types); $sql = "SELECT * FROM contacts WHERE contacttype = IN ('$typeslist') AND status = 'New' ORDER BY date DESC"; $result = mysqli_query($mysqli,$sql) or die ("Error: ".mysqli_error($mysqli)); while ($row = mysqli_fetch_array($result)); { This is the rest of the code: $firstname = $row ['firstname']; echo'.$firstname.'; } ?>
0
[ 2, 5407, 1637, 37, 859, 113, 3131, 19, 13, 5, 22, 5739, 22, 6, 800, 3726, 3726, 31, 22, 79, 452, 2572, 29, 14, 1797, 1021, 15, 32, 22, 18, 1438, 55, 21, 22649, 7019, 17, 31, 92, 22, 38, 477, 602, 19, 14, 5132, 54, 2087, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 a Caliburn.Micro sub menuitem click call an action on the containing view's viewmodel? === I have a top level menu in my ShellView and when selecting a sub MenuItem, I would like to call the following method on the ShellViewModel (a Conductor<IScreen>.Collection.AllActive). public void SelectServer(string pServerName) { mDefaultClaimServer = pServerName; } The following does not work as no method gets called (I have tried various signatures and action parameters) - <Menu Name="menu1" DockPanel.Dock="Top"> <MenuItem Header="Select Server" Name="ClaimServers"> <MenuItem.ItemTemplate> <DataTemplate> <!-- we need this else we show the class name --> <TextBlock Text="{Binding DisplayName}"> <ContentControl cal:Message.Attach="[Event Click] = [Action TxTester.ShellViewModel.SelectServer($Text)]"/> </TextBlock> </DataTemplate> </MenuItem.ItemTemplate> </MenuItem> </Menu> The following does call the ShellViewModel SelectServer method but I get null for the text of the clicked sub MenuItem (I also tried many other signatures and action parameters) - <Menu Name="menu1" DockPanel.Dock="Top"> <MenuItem Header="Select Server" Name="ClaimServers" cal:Message.Attach="SelectServer($this.Text)"> <MenuItem.ItemTemplate> <DataTemplate> <!-- we need this else we show the class name --> <TextBlock Text="{Binding DisplayName}" /> </DataTemplate> </MenuItem.ItemTemplate> </MenuItem> </Menu> I've been struggling with this a long time and can't figure it out. Can someone suggest the proper combination where I can pass the header text of a sub MenuItem to the ShellViewModel SelectServer method? Thanks so much, Dave
0
[ 2, 184, 92, 21, 10352, 4249, 9, 22019, 972, 11379, 2119, 79, 10840, 645, 40, 1028, 27, 14, 3503, 1418, 22, 18, 1418, 13998, 60, 800, 3726, 3726, 31, 57, 21, 371, 662, 11379, 19, 51, 3593, 4725, 17, 76, 20764, 21, 972, 11379, 211...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Angular.js: $http.post to different partial page === I have a parent page and 1 partial pages. I have a form in the parent index.html, I need to take these values and pass it to backend, and the return json object I need to bind it to partial page. Just like advanced search and the values that are returned has to be displayed in a grid. I haven't seen any example of this. Can some one point me in the right direction. Thanks Krishna
0
[ 2, 18270, 9, 728, 18, 45, 5579, 21127, 9, 6962, 20, 421, 7284, 2478, 800, 3726, 3726, 31, 57, 21, 4766, 2478, 17, 137, 7284, 4434, 9, 31, 57, 21, 505, 19, 14, 4766, 4348, 9, 15895, 15, 31, 376, 20, 247, 158, 4070, 17, 1477, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Handling a UIBarButtonItem from a UITabBarController (UITabBarControllerDelegate) === I'm new to this :-(. I have a pretty standard Tab Bar Controller to which I've added a UIButtonBarItem (I used the storyboard editor to do this). It all looks fine, but I don't know how to handle the "button press" event. I have established a delegate for the tab bar controller, so I can capture the "didSelectViewController" events (not that it seems to help :-). I think I'm missing something obvious.
0
[ 2, 7988, 21, 13, 5661, 1850, 811, 444, 2119, 79, 37, 21, 13, 11193, 13100, 139, 12898, 1252, 13, 5, 11193, 13100, 139, 12898, 1252, 24249, 3322, 6, 800, 3726, 3726, 31, 22, 79, 78, 20, 48, 13, 45, 8, 5, 9, 31, 57, 21, 1772, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 behavor with POSIXct/POSIXlt and subsecond accuracy === I am having difficulty having a sequence occur in order when using sub seconds with POSIXct. options(digits.secs=6) x <- xts(1:10, as.POSIXct("2011-01-21") + c(1:10)/1e3) Produces the following output, why aren't the times in order? [,1] 2011-01-21 00:00:00.000 1 2011-01-21 00:00:00.002 2 2011-01-21 00:00:00.003 3 2011-01-21 00:00:00.003 4 2011-01-21 00:00:00.005 5 2011-01-21 00:00:00.006 6 2011-01-21 00:00:00.006 7 2011-01-21 00:00:00.007 8 2011-01-21 00:00:00.009 9 2011-01-21 00:00:00.009 10 I would expect the same output the code below produces c(1:10)/1e3 [1] 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010
0
[ 2, 4210, 44, 14462, 248, 29, 2353, 6742, 4812, 118, 14882, 396, 255, 38, 17, 972, 5007, 11270, 800, 3726, 3726, 31, 589, 452, 6967, 452, 21, 4030, 3744, 19, 389, 76, 568, 972, 2582, 29, 2353, 6742, 4812, 9, 6368, 5, 23904, 18, 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...
My profile image does not show in chat === I have set up a profile image for gmail chat and still my contacts can't see it in chat. What is going on? Thanks
2
[ 2, 51, 5296, 1961, 630, 52, 298, 19, 6615, 800, 3726, 3726, 31, 57, 309, 71, 21, 5296, 1961, 26, 489, 8079, 6615, 17, 174, 51, 11894, 92, 22, 38, 196, 32, 19, 6615, 9, 98, 25, 228, 27, 60, 3669, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
can you help me write down each step by hand for page76's {with {x 3} {+ x x}} in PLAI? === I am studying [PLAI][1]'s Chapter8 "Implementing Laziness", and finished the following CFAE/L: <pre><code>` </code></pre> According to this interpreter, I want to evaluate the page76's <pre><code>{with {x 3} {+ x x}} </code></pre> (1) when typing: > (interp (parse '{with {x 3} {+ x x}}) {mtSub}) I got errors as below: numV-n: contract violation, expected: numV?, given: (exprV (num 3) (mtSub)) contract from: numV-n, blaming: use contract: (-> numV? number?) at: /study/lisp/plai/chapter8.scm:10.9 (2) I wanted to write down the steps by hand for understanding page76's description as below: "The interpreter evaluates each x in the body to an expression closure (because that’s what is bound to x in the environment), but the addition procedure cannot handle these: it (and similarly any other arithmetic primitive) needs to know exactly which number the expression closure corresponds to.", but I am still not clear about this description after finishing the steps. there are my steps : (interp (parse '(with (x 3) (+ x x))) (mtSub)) step1: (parse '(with (x 3) (+ x x))) => (app (fun 'x (add (id 'x) (id 'x))) (num 3)) NOTE: fun-exp is (fun 'x (add (id 'x), arg-expr is (num 3) step2: (cloSureV 'x (add (id 'x) (id 'x)) (mtSub)) (as fun-val) and (experV (num 3) (mtSub)) (as arg-val) step3: (interp (add (id 'x) (id 'x)) (aSub 'x (num 3) (mtSub))) [1]: http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/plai-2007-04-26.pdf
0
[ 2, 92, 42, 448, 55, 2757, 125, 206, 1424, 34, 224, 26, 2478, 4436, 22, 18, 13, 1, 1410, 13, 1, 396, 203, 1, 13, 1, 2430, 993, 993, 1, 19, 6568, 49, 60, 800, 3726, 3726, 31, 589, 4493, 636, 9897, 49, 500, 2558, 165, 500, 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...
A better solution in adding active states to my links using ajax === Please help me someone... I am having some trouble in trying to add an active state to my link, this the code I am playing with: $(function() { $('a').click(function() { $(this).addClass('PnavCurrent'); //$("div a").removeClass("PnavCurrent"); //$("div a[href="+newHash+"]").addClass("PnavCurrent"); $(this).removeClass('PnavCurrent'); $(this).css ('color', '#51ad9d'); $(this).css ('z-index', '2'); $(this).css ('border-color', '#00a8ff'); $('a').hover($(this).css ('z-index', '10')); }); }); For some reason it won't obey and fetch the css active state class ('PnavCurrent') for the links but it does however obey when I specify it in the script code with {$(this).css...}. Now what I would like is at add an hover state z-index for the links in the script code, something like this: $('a').hover($(this).css ('z-index', '10')); I've tried to use that little block of code above in trying to achieve this but it doesn't work. I would greatly appreciate it if anyone could help with this and possibly a better solution overall.
0
[ 2, 21, 574, 4295, 19, 4721, 1348, 202, 20, 51, 6271, 568, 20624, 800, 3726, 3726, 2247, 448, 55, 737, 9, 9, 9, 31, 589, 452, 109, 2572, 19, 749, 20, 3547, 40, 1348, 146, 20, 51, 3508, 15, 48, 14, 1797, 31, 589, 791, 29, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 do this regex command? === This would best be explained with examples. Here is a line before I do anything: <b>Monohydrogen_Phosphate HPO%4^2-</b> Here is what I've done so far: <b>Monohydrogen Phosphate | HPO%4^2-</b> Here is what it should be when finished: <b>Monohydrogen Phosphate | HPO<sub>4</sub><sup>2-</sup></b> The `%` will put the first number (if any) and + or - signs (if any) in a `<sub>` tag, and the `^` will put the first number and +/- in a `<sup>` tag. I am using Javascript's RegEx replace, but I don't mind switching to PHP.
0
[ 2, 184, 20, 107, 48, 7953, 1706, 1202, 60, 800, 3726, 3726, 48, 83, 246, 44, 2897, 29, 3770, 9, 235, 25, 21, 293, 115, 31, 107, 602, 45, 13, 1, 220, 1, 20027, 16658, 1863, 1, 13332, 5301, 111, 11881, 300, 1, 135, 8, 1, 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...
MediaPlayer.start() cannot be called in constructor? === Trying to reduce the number of lines when using MediaPlayer in numerous places throughout my application, I subclass MediaPlayer and in the constructor I call the same 3 lines that repeat each time I need to play a media file: public MyMediaPlayer(Context context, int resid) { create(context, resid); setOnCompletionListener(this); start(); } So that instead of those 3 lines, I only place this in the caller: new MyMediaPlayer(this, R.raw.happybirthday); It compiles and build and even runs, but the media file won't play for some reason. I checked the LogCat and noticed: 07-19 20:00:51.124: E/MediaPlayer(16517): start called in state 1 07-19 20:00:51.124: E/MediaPlayer(16517): error (-38, 0) What do these errors mean? What am I missing? BTW, [onCompletion()][1] is called and runs fine. [1]: http://developer.android.com/reference/android/media/MediaPlayer.html#setOnCompletionListener%28android.media.MediaPlayer.OnCompletionListener%29
0
[ 2, 941, 14049, 9, 13680, 5, 6, 1967, 44, 227, 19, 6960, 248, 60, 800, 3726, 3726, 749, 20, 4136, 14, 234, 16, 1560, 76, 568, 941, 14049, 19, 1548, 1489, 892, 51, 3010, 15, 31, 972, 1898, 941, 14049, 17, 19, 14, 6960, 248, 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...
How to combine sequences in clojure? === I have the following sequences (def a [1 2 3 4]) (def b [10 20 30 40]) (def c [100 200 300 400]) I want to combine the sequences element by element: (... + a b c) To give me: [111 222 333 444] Is there a standard function available to do so? Or alternatively what is a good idiomatic way to do so?
0
[ 2, 184, 20, 12287, 11173, 19, 7383, 2142, 99, 60, 800, 3726, 3726, 31, 57, 14, 249, 11173, 13, 5, 13862, 21, 636, 165, 172, 203, 268, 500, 6, 13, 5, 13862, 334, 636, 1036, 434, 712, 1417, 500, 6, 13, 5, 13862, 272, 636, 4031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Add padding to elements in a UIScrollView === I am trying to create a grid `UIScrollView`, which so far is working great, I am just having a little trouble with adding 20px padding to both the width and height of the `UIImageView`s being displayed in the `UIScrollView``. At the moment, I am adding 20px (`px` & `py`) to both the `x` and `y` values of the UIImageView's frame. However, this just moves the rows along 20px, and the columns down 20px. Please can you tell me where I am going wrong? int x = 0; int y = 0; int w = 65; int h = 65; int c = 0; int r = 0; int px = 20; int py = 20; for (int i = 0; i < [self.content count]; i++) { if (c < 4) c++; else if (c == 4) { c = 0; r++; } x = c * w; y = r * h; x += px; y += py; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(x, y, w, h)]; [imageView setImage:[self.content objectAtIndex:i]]; [imageView setContentMode:UIViewContentModeScaleToFill]; [self.scrollView addSubview:imageView]; [imageView release]; }
0
[ 2, 3547, 4432, 3258, 20, 2065, 19, 21, 13, 5661, 3862, 8694, 4725, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 7354, 13, 1, 5661, 3862, 8694, 4725, 1, 15, 56, 86, 463, 25, 638, 374, 15, 31, 589, 114, 452, 21, 265, 2572, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Pause before starting animation of drawing a path in Raphael JS === I have this working code for animating drawing a line in Raphael JS: var path1 = paper.path("M2 2").attr({"stroke": "#fff", "stroke-width":1}); // Here I need to wait 5 seconds path1.animate({path: "M2 2L100 2"},1500); In my previous question about waiting a certain time before executing a code, one guy suggested me this solution for a delay before starting a fadein animation of a rectangle: http://jsfiddle.net/beajL/ , but with path I am not able to apply the same principle. Any help would be appreciated.
0
[ 2, 6911, 115, 1422, 6236, 16, 3533, 21, 2013, 19, 13874, 487, 18, 800, 3726, 3726, 31, 57, 48, 638, 1797, 26, 14487, 1203, 3533, 21, 293, 19, 13874, 487, 18, 45, 4033, 2013, 165, 800, 1397, 9, 8353, 5, 7, 79, 135, 172, 7, 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...
Facebook Login give me already authorized my app without automatic returning to the app === My app should implement login with facebook but I have noticed that every time I want to login ,a screen appears "You have already authorized this app,Press OK to continue" , the question is if I have already authorized the app the facebook should return automatically without this screen appearing as I saw in other applications ?![enter image description here][1] [1]: http://i.stack.imgur.com/6idqb.png but when i set BOOL=NO in this line in Facebook.m [self authorizeWithFBAppAuth:BOOL safariAuth:BOOL]; its work perfectly, i.e. the popup screen "YOU HAVE ALREADY AUTHORIZED THIS APP" doesn't appear,but i need this functionality with BOOL set to YES. Please help me.
0
[ 2, 9090, 6738, 108, 590, 55, 614, 9401, 51, 4865, 366, 6715, 2485, 20, 14, 4865, 800, 3726, 3726, 51, 4865, 378, 8713, 6738, 108, 29, 9090, 47, 31, 57, 2711, 30, 352, 85, 31, 259, 20, 6738, 108, 13, 15, 58, 2324, 1780, 13, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
is it possible to disable keyboad(UITextField) without hidding? === I'd like to disable UITextField's keyboard without hidding. is it possible? If it's so, could you show me how to do? thanx Carsh
0
[ 2, 25, 32, 938, 20, 1460, 579, 1246, 1192, 1283, 5, 5661, 11969, 1109, 6, 366, 10135, 3258, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 1460, 579, 13, 5661, 11969, 1109, 22, 18, 8896, 366, 10135, 3258, 9, 25, 32, 938, 60, 100, 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, 0...
How to automate mouse and keyboard? === Can i write a java program to automate mouse movements and clicks ?? Like, then i will be able to run the program and it will work like some human being is controlling the machine.. I know about the Robot class. Will that be a solution. Any thought is welcome...
0
[ 2, 184, 20, 3108, 5281, 7567, 17, 8896, 60, 800, 3726, 3726, 92, 31, 2757, 21, 8247, 625, 20, 3108, 5281, 7567, 4889, 17, 10840, 18, 13, 60, 60, 101, 15, 94, 31, 129, 44, 777, 20, 485, 14, 625, 17, 32, 129, 170, 101, 109, 58...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 convent XML nodes to text string using Javascript or Jquery? === I've such a xml string as following: str="<myxml><Node id="1" attr1="a" attr2="b" /><Node id="2" attr1="a" attr2="b" /><Node id="3" attr1="a" attr2="b" /><Node id="4" attr1="a" attr2="b" /></myxml>" function returnNodeAsStr(str){ ... } if(returnNodeAsStr(str) == '<Node id="1" attr1="a" attr2="b" />') {alert("ok");} How to write a function to get the node as string?(make the alert execute) thanks, WA
0
[ 2, 184, 20, 10147, 23504, 16272, 20, 1854, 3724, 568, 8247, 8741, 54, 487, 8190, 93, 60, 800, 3726, 3726, 31, 22, 195, 145, 21, 23504, 3724, 28, 249, 45, 13, 9729, 3726, 7, 1, 915, 396, 8184, 1, 251, 546, 4924, 3726, 7, 165, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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# Read and Write to File at the same time === for an application that uses a File as some sort of global storage for device reservations in a firm I need a way to read and write to a file (or lock a file, read from it, write to it, and unlock it). A little code snippet will shot what I mean: FileStream in = new FileStream("storage.bin", FileMode.Open); //read the file in.Close(); //!!!!! //here is the critical section since between reading and writing, there shouldnt //be a way for another process to access and lock the file, but there is the chance //because the in stream is closed //!!!!! FileStream out = new FileStream("storage.bin", FileMode.Create); //write data to file out.Close(); this should get something like this LockFile("storage.bin"); //read from it... //OVERwrite it.... UnlockFile("storage.bin"); the method should be absolute safe, since the program should run on 2000 devices at the same time
0
[ 2, 272, 5910, 1302, 17, 2757, 20, 3893, 35, 14, 205, 85, 800, 3726, 3726, 26, 40, 3010, 30, 2027, 21, 3893, 28, 109, 2058, 16, 2062, 4326, 26, 3646, 8733, 18, 19, 21, 1904, 31, 376, 21, 161, 20, 1302, 17, 2757, 20, 21, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Getting a merged cell width on Google Spreadsheet API === I'm using the Google Spreadsheet API to convert a document containing workers shifts into event calendars. The only problem is that shifts are represented by merged cells according to days and hours (with days and hours as rows and different work slots as cols), and when I read a certain cell, which is merged and spans over 6 cells, I cannot get the cells certain width or its merged area. For example: ![a busy cat](http://s18.postimage.org/hg9sik5yv/doc.png) If I try to get the values between (4C:4E) I will get "Bob, , ," and not "bob,bob,bob", and I cannot even find a way to know how many cells "bob" take. Do you guys know how can I know how many cells the merged one spread to? Or at least it's total width. Thanks in advance!
0
[ 2, 1017, 21, 3901, 1667, 9456, 27, 8144, 1789, 17627, 21, 2159, 800, 3726, 3726, 31, 22, 79, 568, 14, 8144, 1789, 17627, 21, 2159, 20, 8406, 21, 4492, 3503, 2004, 14162, 77, 807, 7036, 18, 9, 14, 104, 1448, 25, 30, 14162, 50, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 expand a specific div element on mouse click? === For an example, as in twitter we click Expand on individual tweets and then it just expands giving links to the individual tweet or showing the image or video and also the time stamp. And then on next click it just hides the expanded data. Also how to show the show the mouse hand on hovering over the div rather than the mouse arrow. Exactly like in twitter. I hope using jQuery its possible. Can someone give me a sample code for implementing this. ??
0
[ 2, 184, 20, 6073, 21, 1903, 13, 12916, 4520, 27, 7567, 10840, 60, 800, 3726, 3726, 26, 40, 823, 15, 28, 19, 10623, 95, 10840, 6073, 27, 1359, 20224, 18, 17, 94, 32, 114, 6073, 18, 1438, 6271, 20, 14, 1359, 20224, 54, 3187, 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...
ChannelUri can't be got when use wp7.5 push notification === When I tried to use push notification in my app, I found the channelUri cannot be got when I'm using wifi proxy. But my app is deigned for my colleagues in the company who always using the wifi proxy, is there any workround for me to solve the problem? Thank you. -Regards, Aaron.
0
[ 2, 1318, 3594, 92, 22, 38, 44, 330, 76, 275, 13, 13790, 465, 9, 264, 3250, 52, 4634, 800, 3726, 3726, 76, 31, 794, 20, 275, 3250, 52, 4634, 19, 51, 4865, 15, 31, 216, 14, 1318, 3594, 1967, 44, 330, 76, 31, 22, 79, 568, 4807,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
regex for time validation === I want to validate a time with a regex. I created the following expression : `'#^([01][0-9])|(2[0-4])(:[0-5][0-9]){1,2}$#'`. Here is the problem: `<?php var_dump(preg_match('#^([01][0-9])|(2[0-4])(:[0-5][0-9]){1,2}$#', '14:25')); // Returns 1 (OK) var_dump(preg_match('#^([01][0-9])|(2[0-4])(:[0-5][0-9]){1,2}$#', '25:25')); // Returns 0 (OK) var_dump(preg_match('#^([01][0-9])|(2[0-4])(:[0-5][0-9]){1,2}$#', '14:2555')); // Returns 1 (instead of 0 as I would like to get) ?>` Does somebody knows what is the problem? Thanks. Sry for my bad english.
0
[ 2, 7953, 1706, 26, 85, 27999, 800, 3726, 3726, 31, 259, 20, 7394, 1373, 21, 85, 29, 21, 7953, 1706, 9, 31, 679, 14, 249, 1803, 13, 45, 13, 1, 22, 5910, 1, 5, 2558, 3026, 500, 2558, 387, 8, 518, 500, 6, 1, 5, 135, 2558, 387...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Moving cursor position in contentEditable div === I'm trying to move the cursor of a content editable div to the end of the line. By default, it goes to the beginning of the line. I'm using: var r = $("#mydiv").createTextRange(); r.moveStart("character", l); r.moveEnd("character", l); r.select(); The error I get: Uncaught TypeError: Object [object Object] has no method 'createTextRange' I've seen this question posted around, but I still can't seem to perform createTextRange(). Any suggestions?
0
[ 2, 1219, 29588, 649, 19, 2331, 69, 242, 579, 13, 12916, 800, 3726, 3726, 31, 22, 79, 749, 20, 780, 14, 29588, 16, 21, 2331, 9392, 579, 13, 12916, 20, 14, 241, 16, 14, 293, 9, 34, 12838, 15, 32, 1852, 20, 14, 997, 16, 14, 293...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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" only runs from command prompt as Admin === I'm on Windows 7 and if I type "python" in the command prompt as my regular user, I get the old, "'python' is not recognized as an internal or external command, operable program or batch file." but if I open the prompt as the administrator, python initiates like it should. I have changed the permissions on the Python27 folder to allow full access to all users, I've tried adding a pythonexe variable and add that to the PATH, as another StackOverflow question suggested. When I type PATH = C:\Python27 into cmd as a regular user, that also wont work. and if I type in set PATH, "C:\Python27;" is in the returned line. I'm fairly certain it's a permission problem, which is the only reason I've re-posted my own version of this age old question. How do I run Python, given this error and these circumstances?
0
[ 2, 13, 7, 6448, 11570, 7, 104, 1461, 37, 1202, 11443, 4417, 28, 21, 43, 2160, 800, 3726, 3726, 31, 22, 79, 27, 1936, 453, 17, 100, 31, 1001, 13, 7, 6448, 11570, 7, 19, 14, 1202, 11443, 4417, 28, 51, 1290, 4155, 15, 31, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
dates consistently two days off === I am using Java JDBC to write a date to sql server 2008 and then read it back. The date as read is consistently two days earlier than the date as written. I am inserting the row containing the Date field with a prepared statement. The date value is provided by: java.sql.Date todaysDate = new java.sql.Date(System.currentTimeMillis()) ; System.out.println(todaysDate.toString()) -> 2012-07-02 ps.setDate(8, todaysDate); After writing the date to the db, sql server shows me the correct date if I run: select date from table_name where date!=null ->2012-07-02 If I run the same query via JDBC then retrieve the date value from the resultset using java.sql.Date sqlDate = rs.getDate("date") ; sqlDate.toString() ->2012-06-30 The inserted row is the only row in the table with a non-null date so this does not appear to be a case of reading the wrong record. I thought this would be a well known problem but the only reference I could find by a Google search for a "two days off" issue had no definitive answer. Any ideas? beeky (living in the past)
0
[ 2, 4076, 11852, 81, 509, 168, 800, 3726, 3726, 31, 589, 568, 8247, 487, 43, 7229, 20, 2757, 21, 1231, 20, 4444, 255, 8128, 570, 17, 94, 1302, 32, 97, 9, 14, 1231, 28, 1302, 25, 11852, 81, 509, 1201, 119, 14, 1231, 28, 642, 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...
How to execute a program from a php web page? === Summary ------- I have apache running on a Linux machine where a certain program is installed. I want to call the program from a php page and get the output. Special constraint ------------------ The program needs certain environment variables to run, e.g. LD_LIBRARY_PATH with path to libraries plus extra variables. The environment is defined for a user *X* on the machine that is not the *apache* user. Proposed options ---------------- So far I have thought of the following options (not meaning that they are all smart or safe): 1. Allow user *apache* to run the program as user *X* (in a way that allows having the full environment). Recipe ? 2. Modify the environment of user *apache*. I don't see how because apache is a *nologin* user. 3. SSH to another machine as a user that has the proper environment. It means to have a no password (public/private keys) connection between the web server and this machine. Is it dangerous ? Questions --------- - Did I overlook a simpler or better option ? - What option would you use and why ?
0
[ 2, 184, 20, 15644, 21, 625, 37, 21, 13, 26120, 2741, 2478, 60, 800, 3726, 3726, 14740, 13, 8, 8, 8, 8, 8, 8, 8, 31, 57, 17140, 946, 27, 21, 13024, 1940, 113, 21, 1200, 625, 25, 4066, 9, 31, 259, 20, 645, 14, 625, 37, 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...
Calling function to run when idle in matlab === Is it possible in matlab to call a function when the program I'm running is idle? I don't want this to be a parallel process. Also, I would prefer a solution where I could pause and resume the function when the main program has to run again. Kind of like an interrupt in embedded systems, in my case the main program is the interrupt. how would I do this?
0
[ 2, 2555, 1990, 20, 485, 76, 18652, 19, 4277, 9086, 800, 3726, 3726, 25, 32, 938, 19, 4277, 9086, 20, 645, 21, 1990, 76, 14, 625, 31, 22, 79, 946, 25, 18652, 60, 31, 221, 22, 38, 259, 48, 20, 44, 21, 3821, 953, 9, 67, 15, 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...
Multiple Table Inheritance vs Polymorphic === I’m creating an app that allows a user to create a course and include different types of resources (document, video, quiz) in the course. I’m having a hard time figuring out the best way to set up association between a course and its resources. Right now, I have: class Course < AR::Base has_many :documents has_many :videos has_many :quizzes end class Document <AR::Base belongs_to :course end class Video <AR::Base belongs_to :course end class Quiz <AR::Base belongs_to :course end Documents, Videos, and Quizzes all have some common attributes (e.g., name, description) but also many attributes that differ. I considered using STI and having them inherit from a single class called “Lessons.” I decided against this approach because I need multiple controllers for each class. Ultimately, I want to be able to perform operations on all the resources that belong to a course so for example list all the documents, videos, and quizzes together and display them as a sortable list. Any suggestions on how best to set up this model. It seems as if I could do it two ways: - Reverse polymorphic has_one association (see [example][1]) - Multiple Table inheritance (see [example][2]) I’m a rails noob so I’m having a hard time evaluating which approach is best for this situation. Any advice would be appreciated! [1]: https://gist.github.com/1242485 [2]: http://mediumexposure.com/multiple-table-inheritance-active-record/
0
[ 2, 1886, 859, 13852, 4611, 3446, 12498, 596, 800, 3726, 3726, 31, 1, 79, 2936, 40, 4865, 30, 2965, 21, 4155, 20, 1600, 21, 674, 17, 468, 421, 2551, 16, 2566, 13, 5, 28132, 15, 763, 15, 17667, 6, 19, 14, 674, 9, 31, 1, 79, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
javascript sort rows by column === I have the following function which has a problem in that after inserting the rows back into the table, they appear empty when inspecting with firebug. Hopefully it's a simple fix to this code: [pastebin of function][1] [1]: http://pastebin.com/JASAsFJX If someone could explain how to link pastebin on here as well, that would be appreciated, for some reason the code block didn't work for me.
1
[ 2, 8247, 8741, 2058, 11295, 34, 4698, 800, 3726, 3726, 31, 57, 14, 249, 1990, 56, 63, 21, 1448, 19, 30, 75, 14692, 68, 14, 11295, 97, 77, 14, 859, 15, 59, 1893, 2424, 76, 19, 7350, 68, 29, 535, 16254, 9, 13416, 32, 22, 18, 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...
Django - Allow users to each have their own jquery grid / data grid === I'd like my users to each have their own jquery grid / data grid that they can edit. When users log in, they can see the data they entered into their grid. Each user should have his/her own grid What is the best way to accomplish this?
1
[ 2, 3857, 14541, 13, 8, 1655, 3878, 20, 206, 57, 66, 258, 487, 8190, 93, 7354, 13, 118, 1054, 7354, 800, 3726, 3726, 31, 22, 43, 101, 51, 3878, 20, 206, 57, 66, 258, 487, 8190, 93, 7354, 13, 118, 1054, 7354, 30, 59, 92, 9392, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Adding SSL Certificate to Adobe Air Mobile App === Do you need to embed your site SSL Certificate inside your app if your using HTTPS to connect to your Server. My SSL Certificate is configure to accept *.Domain.name from GoDaddy. Currently I have Ignore SSL enabled in order to test my application. Anyone know how this can be done. Thanks in advance..
0
[ 2, 4721, 13, 18, 18, 255, 6259, 20, 20299, 282, 3241, 4865, 800, 3726, 3726, 107, 42, 376, 20, 11911, 69, 154, 689, 13, 18, 18, 255, 6259, 572, 154, 4865, 100, 154, 568, 7775, 18, 20, 6379, 20, 154, 8128, 9, 51, 13, 18, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Naming left and right specific classes when having ltr and rtl support === I've been working on a multilingual site that needs left-to-right as well as right-to-left support. This is done by placing common styling in base.css and then load either base-left.css or base-right.css based on the language of the visitor. During the project, I was repeatedly faced with a naming problem: what to call classes that differ only in what direction they place elements? Here is an example: I have a lot of buttons on the site that have common styling, so I place that styling in a .button class. This contains font-size, color etc. Most buttons should not be floated by default, but some should be floated to the left and have a margin-right. So I call them .button-left and assign all such buttons the two classes of .button and .button-left. And repeat for buttons placed to the right. Like this: <div class="button button-left">Click me</div> The css: .button {color:blue;font-family:Arial;border:1px solid gray;} .button-left {float:left;margin-right:10px;} .button-right {float:right;margin-left:10px;} This way, I don't need to place float and margin on .button which then needs to be overwritten for all other buttons. So far so good. However, and this is my problem, classes such as button-left works well in my base-left.css file, where a .button-left is a button that is placed to the left in an element. But placed in my base-right.css file is a class called .button-left that positions the button to the right, which is really confusing. So my question is, is there a better way of naming classes like these?
0
[ 2, 10929, 225, 17, 193, 1903, 2684, 76, 452, 7137, 139, 17, 761, 7786, 555, 800, 3726, 3726, 31, 22, 195, 74, 638, 27, 21, 1889, 23427, 689, 30, 2274, 225, 8, 262, 8, 4183, 28, 134, 28, 193, 8, 262, 8, 9742, 555, 9, 48, 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...
MP4 not playing in IE9/Chrome === I have an iOS app which takes advantage of the camera to create and save videos, whicha re then uploaded to a web server. However, when I try to view these videos on the server using IE9, I get an audio stream, but I only see the poster. When viewed in Chrome, I *do* see a video, but it is rotated 90 degrees from what it should be. The MP4 files already use the H.264 encoding. When I tried converting the MP4 to FLV and using it in a flash player, it was still rotated 90 degrees. I have tried videojs but to no avail. What is causing this and how can I fix it?
0
[ 2, 4628, 300, 52, 791, 19, 13, 660, 12766, 12985, 800, 3726, 3726, 31, 57, 40, 13, 7760, 4865, 56, 1384, 3314, 16, 14, 3336, 20, 1600, 17, 2079, 6610, 15, 56, 58, 302, 94, 23782, 20, 21, 2741, 8128, 9, 207, 15, 76, 31, 1131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Web app development and comparison between object databases for java === <pre> Hi all, I am about to start a new (social-network-like) web application with commercial potential using servlets and JSPs in java. Im not very expirienced in web applications and databases. I am looking for a DB which will be easy-to-use and doesn't require too much time to spend on learning APIs or for development. I guess if my application become popular (and turn it to a business or something) and has more traffic/data/requests to handle I can immigrate the data from one DB to a better one or a more organized. I searched around about, and I concluded that OODBs are best to use because they are simple and they dont require much time to develop. I came up with these 3 (and their links): - db4o: http://www.db4o.com/ - JODB: http://www.java-objects-database.com/ - ObjectDB: http://www.objectdb.com/ I dont know which is best to start my app or if there is something better. Any help? Any other advice about web delopment would be appriciated ... Many thanks </pre>
0
[ 2, 2741, 4865, 522, 17, 6050, 128, 3095, 6018, 18, 26, 8247, 800, 3726, 3726, 13, 1, 3515, 1, 4148, 65, 15, 31, 589, 88, 20, 799, 21, 78, 13, 5, 11559, 8, 24106, 8, 1403, 6, 2741, 3010, 29, 1439, 2222, 568, 13, 10321, 11045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Regular Expression - exclude part of string === This is a follow-up to a [previous question][1]. I have a string "Test 999-99-9", how would I match on everything except the last -9 part? Keep in mind, the last -9 may or may not be there, but if it is, I want to ignore it and match on the rest of the string. Any suggestions? Alternatively, if it ignored the entire 999-99-9 or 999-99 part, and just returned the "Test" part, that would be fine, too. It seems like that may be easier to do. I basically want to take the following expression and invert it to return the other half of the string: (\d{3}-\d{2}|\d{3}-\d{2}-\d{1})$ [1]: http://stackoverflow.com/questions/11346521/assistance-with-a-regular-expression
0
[ 2, 1290, 1803, 13, 8, 21077, 141, 16, 3724, 800, 3726, 3726, 48, 25, 21, 1740, 8, 576, 20, 21, 636, 3515, 1755, 1291, 1301, 500, 2558, 165, 500, 9, 31, 57, 21, 3724, 13, 7, 10543, 13, 23170, 8, 3483, 8, 518, 7, 15, 184, 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...
RIGHT OUTER JOIN in SQLAlchemy === I have two tables `beard` and `moustache` defined below: +--------+---------+------------+-------------+ | person | beardID | beardStyle | beardLength | +--------+---------+------------+-------------+ +--------+-------------+----------------+ | person | moustacheID | moustacheStyle | +--------+-------------+----------------+ I have created a SQL Query in PostgreSQL which will combine these two tables and generate following result: +--------+---------+------------+-------------+-------------+----------------+ | person | beardID | beardStyle | beardLength | moustacheID | moustacheStyle | +--------+---------+------------+-------------+-------------+----------------+ | bob | 1 | rasputin | 1 | | | +--------+---------+------------+-------------+-------------+----------------+ | bob | 2 | samson | 12 | | | +--------+---------+------------+-------------+-------------+----------------+ | bob | | | | 1 | fu manchu | +--------+---------+------------+-------------+-------------+----------------+ **Query:** SELECT * FROM beards LEFT OUTER JOIN mustaches ON (false) WHERE person = "bob" UNION ALL SELECT * FROM beards b RIGHT OUTER JOIN mustaches ON (false) WHERE person = "bob" However I can not create SQLAlchemy representation of it. I tried several ways from implementing `from_statement` to `outerjoin` but none of them really worked. Can anyone help me with it?
0
[ 2, 193, 4896, 1865, 19, 4444, 10834, 2569, 915, 800, 3726, 3726, 31, 57, 81, 7484, 13, 1, 23542, 1, 17, 13, 1, 14002, 38, 9616, 1, 2811, 1021, 45, 2754, 8, 8, 8, 8, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2430, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Having issues with centering text in TextView within a region... === I'm having issues with TextViews and centering the text within the text region. Specifically, I have a TextView, but when I have text inside that contains letters that straddle down the bottom margin (i.e. p, g, q, y, etc), those letters are getting cut-off. I'm trying to center the text within the region but haven't had much luck. Below is my layout. Can you guys see what I'm doing wrong? Note that there are certain parameters that I can't change, namely the textSize and the layout_width and layout_height of the parent. Also the region (defined in the layout_height) of the TextView is fixed. The emulator shows that the bottom margin cuts off the text... <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <LinearLayout android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="43.3dip" android:background="@drawable/custom_bg" android:orientation="horizontal"> <ImageButton android:id="@+id/headshot" android:layout_width="43.3dip" android:layout_height="43.3dip" android:src="@drawable/sample" android:background="@drawable/head_btn" android:layout_gravity="center" /> <RelativeLayout android:id="@+id/name_and_email" android:layout_width="230.7dip" android:layout_height="43.3dip" android:orientation="vertical"> <TextView android:id="@+id/name" android:layout_width="fill_parent" android:layout_height="22dip" android:textColor="@color/custom_color" android:textSize="18.6sp" android:layout_gravity="center" android:singleLine="true" android:ellipsize="end" android:layout_alignParentTop="true" android:background="#ff000d" android:gravity="center" android:text="ggggg" /> <TextView android:id="@+id/email" android:layout_width="fill_parent" android:layout_height="18dip" android:textColor="@color/custom_color" android:textSize="14.3sp" android:layout_gravity="center" android:singleLine="true" android:ellipsize="end" android:layout_below="@id/name" android:layout_centerInParent="true" android:layout_alignParentBottom="true" android:background="#00ff00" android:gravity="center" android:text="ggggpgjq@gmail.com" /> </RelativeLayout> <ImageButton android:id="@+id/headshot2" android:layout_width="43.3dip" android:layout_height="43.3dip" android:src="@drawable/sample" android:background="@drawable/head_btn2" android:layout_gravity="center" /> </LinearLayout> </LinearLayout> Can anyone help? MB
0
[ 2, 452, 1549, 29, 459, 68, 1854, 19, 1854, 4725, 363, 21, 632, 9, 9, 9, 800, 3726, 3726, 31, 22, 79, 452, 1549, 29, 1854, 4725, 18, 17, 459, 68, 14, 1854, 363, 14, 1854, 632, 9, 3524, 15, 31, 57, 21, 1854, 4725, 15, 47, 76...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 reset viewport scaling without full page refresh? === I have a web-page that has the "user-scalable" attribute of the viewport meta tag set to true ([Safari reference](http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/html/const/viewport), [Android reference](http://developer.android.com/guide/webapps/targeting.html#Metadata)). So users with browsers that recognize the attribute (such as Mobile Safari, Android Browser) can pinch to scale the page. However, there is a link that refreshes most of the page using AJAX, but does not perform a full page refresh. I'd like to reset the viewport scaling to the initial value using JavaScript. But I can't figure out how to do this. The only solution seems to be a full page refresh. Anyone know of a better way? Thanks.
0
[ 2, 184, 20, 23422, 1418, 1993, 26829, 366, 503, 2478, 24905, 60, 800, 3726, 3726, 31, 57, 21, 2741, 8, 6486, 30, 63, 14, 13, 7, 16704, 8, 18, 3430, 579, 7, 35, 14755, 16, 14, 1418, 1993, 7618, 3383, 309, 20, 1151, 13, 5, 2558,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Android: TableLayout next to LinearLayout === In Android I'm trying to use this xml to get a TableLayout next to a LinearLayout. But I can't get it working. The TableLayout always takes up the full width of the screen. How can I get it to share the screen width with the LinearLayout? <LinearLayout android:layout_width="fill_parent" android:weightSum="1" android:layout_height="wrap_content" android:orientation="horizontal"> <TableLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5"> <TableRow> <TextView android:text="Name1:" /> <TextView android:text="Value1" /> </TableRow> <TableRow> <TextView android:text="Name2:" /> <TextView android:text="Value2" /> </TableRow> </TableLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5"></LinearLayout> </LinearLayout>
0
[ 2, 13005, 45, 859, 4414, 1320, 328, 20, 6745, 4414, 1320, 800, 3726, 3726, 19, 13005, 31, 22, 79, 749, 20, 275, 48, 23504, 20, 164, 21, 859, 4414, 1320, 328, 20, 21, 6745, 4414, 1320, 9, 47, 31, 92, 22, 38, 164, 32, 638, 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...