unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Setting up Gstreamer on eclispe === I am basically looking to modify existring gstreamer code. So, I will like to have the code setup a C++ Project in eclipse CDT. I didn't come across any source which talks about the same. Let me know if anyone has done this before or know how to get this code.
0
[ 2, 2697, 71, 489, 11260, 106, 27, 6695, 3159, 1664, 800, 3726, 3726, 31, 589, 11374, 699, 20, 17579, 3182, 2090, 489, 11260, 106, 1797, 9, 86, 15, 31, 129, 101, 20, 57, 14, 1797, 18161, 21, 272, 20512, 669, 19, 11652, 1745, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OpenGL : Draw curve between 3 points === Basically I wish to draw a curve between 3 points in openGL as the below image indicates. I've found a couple of segments of code which would be useful for drawing a bezier curve using 4 points but for 3 points I've had really no success. Any help would be much appreciated. ![enter image description here][1] [1]: http://i.stack.imgur.com/PNZBa.png
0
[ 2, 368, 8430, 13, 45, 2003, 7101, 128, 203, 819, 800, 3726, 3726, 11374, 31, 2536, 20, 2003, 21, 7101, 128, 203, 819, 19, 368, 8430, 28, 14, 1021, 1961, 6475, 9, 31, 22, 195, 216, 21, 1335, 16, 9061, 16, 1797, 56, 83, 44, 4811...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
AutoComplete in a jquery dropDown === I am having a dropdownList which contains profile names of my customers. As the number of customers is ever growing I need an autocompletion functionality so that I am able to look for a particular user with suggestions and I am not forced to look for every existing user in the drop down list I am new to jquery please help. Following is the code which fetches data from a centralised database $.getJSON( "profiles/custoomer.aspx?callback=?", {}, function (data) { $.each(data, function (value, name) { $('<option>').attr('value', value).text(name).appendTo('#customer_profile'); }); } );
0
[ 2, 3108, 15990, 19, 21, 487, 8190, 93, 2804, 2968, 800, 3726, 3726, 31, 589, 452, 21, 2804, 2968, 5739, 56, 1588, 5296, 1817, 16, 51, 5279, 9, 28, 14, 234, 16, 5279, 25, 462, 1991, 31, 376, 40, 3108, 11103, 1336, 872, 18548, 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, 1, 1, 1, 1...
Improving load balancing in hadoop === I have the following strings as the keys. From the below coding, I see the all the keys go to the same reducer, though there are many reducers. In the end, the same reducer is over loaded. I want, each key(String), to go to a different reducer. Pls help me with this issue. Thanks! String a = "71 1 2"; String b = "72 1 1"; String c = "70 1 3"; int hash_a = a.hashCode(); int hash_b = b.hashCode(); int hash_c = c.hashCode(); int part_a = hash_a % 10; int part_b = hash_b % 10; int part_c = hash_c % 10; System.out.println("hash a: "+hash_a+" part_a: "+part_a); System.out.println("hash b: "+hash_b+" part_b: "+part_b); System.out.println("hash c: "+hash_c+" part_c: "+part_c); Output: hash a: 1620857277 part_a: 7 hash b: 1621780797 part_b: 7 hash c: 1619933757 part_c: 7
0
[ 2, 9273, 6305, 16416, 6302, 19, 41, 21709, 800, 3726, 3726, 31, 57, 14, 249, 7887, 28, 14, 5534, 9, 37, 14, 1021, 13, 15458, 15, 31, 196, 14, 65, 14, 5534, 162, 20, 14, 205, 4136, 139, 15, 362, 80, 50, 151, 4136, 1224, 9, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Create image from file programmaticaly asp.net C# === I am writing project in asp.net C#. I want to create Image programmaticaly by the following code: protected void Page_Load(object sender, EventArgs e) { Image image = new Image(); image.ID = "image11"; image.ImageUrl = "a.jpg"; image.ImageAlign = ImageAlign.AbsMiddle; image.Visible = true; } But nothing is displayed when I run the project. How to create image from file and display it in the page by writing code in .cs file?
0
[ 2, 1600, 1961, 37, 3893, 625, 6732, 58, 102, 28, 306, 9, 2328, 272, 5910, 800, 3726, 3726, 31, 589, 1174, 669, 19, 28, 306, 9, 2328, 272, 5910, 9, 31, 259, 20, 1600, 1961, 625, 6732, 58, 102, 34, 14, 249, 1797, 45, 3803, 11364...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Looking for an algorithm that distributes a width to columns === I would like to print a database-table to STDOUT. If the table-width is greater than the screen-width I would like to cut the column each with the same percentage (unless a table-width has reached `min_width`) until the table fits in the screen. I've tried to solve this with the posted subroutine. Does somebody know a shorter and more elegant algorithm to solve this problem? sub cal_size { my ( $maxcols, $ref ) = @_; # $maxcols => screen width # $ref => ref to an AoA; holds the table my ( $max ) = cal_tab( $ref ); # $max => ref to an array; holds the length of the longest string of each column # $tab = 2; if ( $max and @$max ) { my $sum = sum( @$max ) + $tab * @$max; $sum -= $tab; my @max_tmp = @$max; my $percent = 0; while ( $sum > $maxcols ) { $percent += 0.5; if ( $percent > 99 ) { return; } my $count = 0; for my $i ( 0 .. $#max_tmp ) { # $min_width => columns width should not be less than $min_width if possible next if $min_width >= $max_tmp[$i]; # no need to cut if the column width id less than min_width next if $min_width >= minus_x_percent( $max_tmp[$i], $percent ); # don't cut if column width become less than min_width $max_tmp[$i] = minus_x_percent( $max_tmp[$i], $percent ); $count++; last if $sum <= $maxcols; } $min_width-- if $count == 0 and $min_width > 1; # if no cuts but $sum > $maxcols reduce $min_width $sum = sum( @max_tmp ) + $tab * @max_tmp; $sum -= $tab; } $max = [ @max_tmp ] if @max_tmp; my $rest = $maxcols - $sum; while ( $rest > 0 ) { # distribute the rest my $count = 0; for my $i ( 0 .. $#max_tmp ) { if ( $max_tmp[$i] < $max->[$i] ) { $max_tmp[$i]++; $rest--; $count++; last if $rest < 1; } } last if $count == 0; last if $rest < 1; } } return $max; } sub minus_x_percent { my ( $value, $percent ) = @_; return int $value - ( $value * 1/100 * $percent ); }
0
[ 2, 699, 26, 40, 9083, 30, 14751, 18, 21, 9456, 20, 7498, 800, 3726, 3726, 31, 83, 101, 20, 4793, 21, 6018, 8, 5924, 20, 354, 43, 1320, 9, 100, 14, 859, 8, 3976, 43, 96, 25, 1894, 119, 14, 2324, 8, 3976, 43, 96, 31, 83, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Condition a ..count.. summation on the faceting variable === I'm trying to annotate a bar chart with the percentage of observations falling into that bucket, *within* a facet. This question is very closely related to this question: http://stackoverflow.com/questions/3695497/ggplot-showing-instead-of-counts-in-charts-of-categorical-variables but the introduction of faceting introduces a wrinkle. The answer to the related question is to use stat_bin w/ the text geom and then have the label be constructed as so: stat_bin(geom="text", aes(x = bins, y = ..count.., label = paste(round(100*(..count../sum(..count..)),1), "%", sep="") ) This works fine for an un-faceted plot. However, with facets, this sum(..count..) is summing over the entire collection of observations without regard for the facets. The plot below illustrates the issue---not that the percentages do not sum to 100% within a panel. ![enter image description here][1] Here the actually code for the figure above: g.invite.distro <- ggplot(data = df.exp) + geom_bar(aes(x = invite_bins)) + facet_wrap(~cat1, ncol=3) + stat_bin(geom="text", aes(x = invite_bins, y = ..count.., label = paste(round(100*(..count../sum(..count..)),1), "%", sep="") ), vjust = -1, size = 3) + theme_bw() + scale_y_continuous(limits = c(0, 3000)) [1]: http://i.stack.imgur.com/AZZ3Q.png
0
[ 2, 2874, 21, 13, 9, 9, 16549, 9, 9, 18074, 3309, 27, 14, 276, 1203, 7612, 800, 3726, 3726, 31, 22, 79, 749, 20, 40, 1270, 1373, 21, 748, 1795, 29, 14, 5780, 16, 9820, 3106, 77, 30, 12433, 15, 1637, 1410, 108, 2483, 21, 276, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
CalendarExtender displays calendar on page load in compatibility mode === I have an asp.net page that contains a datagrid. The grid contains several textbox/calendar extender controls. Everything initially works as planned. The issue I have is that on returning to the page, if there is data in one of my textbox/calendarextender controls in the grid, the control will display the calendar selection on page load. If there is no data, it does not display the calendar. This only manifests if viewing in Compatibility mode using IE 9. I'm loading the value of the previously selected date in the datagrid_itemdatabound event handler, but it's not the last ui element that gets set. Further, the calendar remains displayed regardless of what form element I select unless/until i select the field for which the calendar is being displayed, and then move to another form element, at which time it behaves as expected and hides the calendar. I just can't figure out why it's displaying the calendar in this element when there is a date value on the page load. Any thoughts?
0
[ 2, 7036, 1706, 38, 13630, 9412, 7036, 27, 2478, 6305, 19, 13, 21618, 3740, 800, 3726, 3726, 31, 57, 40, 28, 306, 9, 2328, 2478, 30, 1588, 21, 1054, 16375, 9, 14, 7354, 1588, 238, 1854, 5309, 118, 3430, 219, 2542, 7206, 106, 8671, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Grid - button click handler === In my `Grid`, when i click on the Action button (the delete and edit button shown in the code below), i need to pop open a window without alerting the user with a Alert message; In the following code i am using a HANDLER `handler: buttonClicked` and trying to access the row value i clicked from a different function below; `buttonClicked :function (){...` 1.) I don't know how to do this, can someone please help me ? 2.) Can i access the row i clicked and display its name from the `Controller` class ? Ext.create('Ext.grid.Panel', { title: 'Action Column Demo', store: Ext.data.StoreManager.lookup('employeeStore'), columns: [ {text: 'First Name', dataIndex:'firstname'}, {text: 'Last Name', dataIndex:'lastname'}, { xtype:'actioncolumn', width:50, items: [{ icon: 'extjs/examples/shared/icons/fam/cog_edit.png', // Use a URL in the icon config tooltip: 'Edit', handler: buttonClicked },{ icon: 'extjs/examples/restful/images/delete.png', tooltip: 'Delete', handler: function(grid, rowIndex, colIndex) { var rec = grid.getStore().getAt(rowIndex); alert("Terminate " + rec.get('firstname')); } }] } ], width: 250, renderTo: Ext.getBody(), buttonClicked :function (){ var rec = grid.getStore().getAt(rowIndex); alert("Edit" + rec.get('firstname')); } });
0
[ 2, 7354, 13, 8, 5167, 10840, 24641, 800, 3726, 3726, 19, 51, 13, 1, 16375, 1, 15, 76, 31, 10840, 27, 14, 1028, 5167, 13, 5, 124, 27448, 17, 9392, 5167, 1721, 19, 14, 1797, 1021, 6, 15, 31, 376, 20, 1675, 368, 21, 1463, 366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Registered COM object not recognized by python's win32com.client.dispatch() === I'm trying to load a COM object with Python. I'm using win32com.client.Dispatch("Name.Of.Object") to load it, and the COM object has been registered with regsvr32 and appears as an entry in my registry in both HKLM/CLSID and HKLM/Wow6432Node/CLSID. I can open it using VBScript just fine, but Python's win32com.client.Dispatch() gives me this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) pywintypes.com_error: (-2147221164, 'Class not registered', None, None) I have read that there are issues with 32 vs 64 bit; I'm running this on a 64-bit machine using 32-bit python and 32-bit win32com. Any suggestions? Note that this code in VBScript works fine: Set obj = WScript.CreateObject( "Name.Of.Object" ) Thanks
0
[ 2, 3801, 13, 960, 3095, 52, 2124, 34, 20059, 22, 18, 628, 3125, 960, 9, 150, 18513, 38, 9, 2906, 23661, 5, 6, 800, 3726, 3726, 31, 22, 79, 749, 20, 6305, 21, 13, 960, 3095, 29, 20059, 9, 31, 22, 79, 568, 628, 3125, 960, 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...
Cant show the invitation box for inviting in homepage === I want to make beta invites. But I cant see the invitation form on homepage. /static_pages/home.html.erb:( Shortly) <% if signed_in? %> <div class="row"> <aside class="span2"> <section> <%= render 'shared/invitation_form' %> </section> </aside> <div class="span6 hero-unit"> <ol class="topics-signedin"> <%= render 'shared/topics' %> </ol> </div> </div> <% else %> <div class="row"> <div class="span10"> <div class="center hero-unit"> <h2>Giripedia</h2> <ol class="topics"> <%= render 'shared/topics' %> </ol> <%= link_to "Üye Olun!", signup_path, class: "btn btn-large btn-primary center" %> <p>Sitemiz ş....</p> <% form_for Invitation.new do |f| %> <p> <%= f.label :recipient_email, "Emailiniz:" %> <%= f.text_field :recipient_email %> <%= f.submit 'Gönder' %> </p> <% end %> </div> </div> <% end %> rake routes : new_invitation GET /invitations/new(.:format) invitations#new edit_invitation GET /invitations/:id/edit(.:format) invitations#edit invitation GET /invitations/:id(.:format) invitations#show PUT /invitations/:id(.:format) invitations#update DELETE /invitations/:id(.:format) invitations#destroy my static_pages_controller.rb: def home if signed_in? @topic = current_user.topics.build if signed_in? end @topics = Topic.paginate :page => params[:page], :per_page => 20 @invitation = Invitation.new end And my _invitation_form.html.erb: <% form_for @invitation do |f| %> <p> <%= f.label :recipient_email, "Arkadaşının email adresi" %><br /> <%= f.text_field :recipient_email %> </p> <p><%= f.submit "Davet et!" %></p> <% end %> The logs show : (0.1ms) SELECT COUNT(*) FROM "topics" WHERE "topics"."user_id" = 1 Rendered shared/_user_info.html.erb (2.4ms) Rendered shared/_error_messages.html.erb (0.4ms) Rendered shared/_topic_form.html.erb (2.9ms) Rendered shared/_invitation_form.html.erb (1.8ms) Topic Load (0.1ms) SELECT "topics".* FROM "topics" ORDER BY topics.created_at DESC LIMIT 20 OFFSET 0.. But it does not show the User.form.Do you have any idea?
0
[ 2, 2973, 298, 14, 7470, 1649, 26, 17076, 19, 213, 6486, 800, 3726, 3726, 31, 259, 20, 233, 8434, 10275, 18, 9, 47, 31, 2973, 196, 14, 7470, 505, 27, 213, 6486, 9, 13, 118, 18077, 1, 6486, 18, 118, 8167, 9, 15895, 9, 106, 220, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Mapping a collection to a subselect with Fluent nHibernate === I've got a class that looks like: public class Competitor { public virtual int CompetitorId { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } public virtual IEnumerable<string> SportsCompeted { get; set; } } `SportsCompeted` is a list of SportIDs (strings) resolved like so: SELECT DISTINCT SportID FROM results WHERE competitorId = xxx How would I go about mapping something like that? Looking at HasMany I can specify a `Where` clause, but I don't think that's quite what I'm looking for in this case? I'm using Fluent Mappings, omitted for brevity.
0
[ 2, 13305, 21, 1206, 20, 21, 972, 18, 16964, 29, 19252, 12109, 15191, 8820, 800, 3726, 3726, 31, 22, 195, 330, 21, 718, 30, 1879, 101, 45, 317, 718, 13638, 13, 1, 317, 6599, 19, 38, 13638, 1340, 13, 1, 164, 73, 309, 73, 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...
Two 'calls' to drag events in d3 === I'm using the force-directed layout in d3 and I'm running into a bit of a snag in development. var circle = svg.append("svg:g").selectAll("circle") .data(force.nodes()) .enter().append("svg:circle") .attr("r", function( d ) { return d.fValue; }) .style('fill', function( d ) { return strokeColor( d.name ); }) .call(force.drag); Basically, I want to add more event listeners to the 'drag' behavior defined by force.drag - namely, I want to make sure that the nodes change color on drag (not on mouseover). The only two ways that I can think of doing this is either to somehow change force.drag function OR define a new drag behavior. I don't know how to do it the first way but when I tried it this second way, the method chaining would only take the second drag event, ignoring the first force.drag event. .call(customDrag) .call(force.drag); // This would work How do I attach another drag event listener or modify the existing force.drag to accomodate for the new animation I want to add? Thanks in advance
0
[ 2, 81, 13, 22, 9200, 18, 22, 20, 5501, 963, 19, 13, 43, 240, 800, 3726, 3726, 31, 22, 79, 568, 14, 558, 8, 14147, 9106, 19, 13, 43, 240, 17, 31, 22, 79, 946, 77, 21, 1142, 16, 21, 28755, 19, 522, 9, 4033, 2775, 800, 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...
SQL Merging rows with specific matching columns === I'm trying to handle this issue in my code that should be handled in SQL. The problem is I want to take this ID COL 1 | ID COL 2 | CHARGE | PAYMENT 2 | 3 | 17 | 0 2 | 3 | 0 | 17 and turn it into this ID COL 1 | ID COL 2 | CHARGE | PAYMENT 2 | 3 | 17 | 17 table1 id | whatever | whatever1 5 | null | null table2 id | id col 1 | id col 2 | charge | payment 5 | 2 | 3 | 17 | 0 5 | 2 | 3 | 0 | 17 current result: id | whatever | whatever1 | idcol1 | idcol2 | charge | payment 5 | null | null | 2 | 3 | 17 | 0 5 | null | null | 2 | 3 | 0 | 17 want: id | whatever | whatever1 | idcol1 | idcol2 | charge | payment 5 | 2 | 3 | 17 | 17 The problem is during my sql call I'm doing an inner join, which does a cartesian product for some of the values rather than doing what I'd want above. Does anyone have an idea how this could be accomplished?
0
[ 2, 4444, 255, 18842, 11295, 29, 1903, 10120, 7498, 800, 3726, 3726, 31, 22, 79, 749, 20, 3053, 48, 1513, 19, 51, 1797, 30, 378, 44, 9006, 19, 4444, 255, 9, 14, 1448, 25, 31, 259, 20, 247, 48, 4924, 3313, 137, 13, 1, 4924, 3313...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Making a dictionary from a list of lists === I have been unable to figure this out, I think the problem might be in the way I am making the list of lists. Can anyone help out? Thanks! My desired outcome is codondict = {'A': ['GCT','GCC','GCA','GCG'], 'C': ['TGT','TGC'], &c but what i get is: {'A': 'A', 'C': 'C', &c. Here's my terminal: >>> A=['GCT','GCC','GCA','GCG'] >>> C=['TGT','TGC'] >>> D=['GAT','GAC'] >>> E=['GAA','GAG'] >>> F=['TTT','TTC'] >>> G=['GGT','GGC','GGA','GGG'] >>> H=['CAT','CAC'] >>> I=['ATT','ATC','ATA'] >>> K=['AAA','AAG'] >>> L=['TTA','TTG','CTT','CTC','CTA','CTG'] >>> M=['ATG'] >>> N=['AAT','AAC'] >>> P=['CCT','CCC','CCA','CCG'] >>> Q=['CAA','CAG'] >>> R=['CGT','CGC','CGA','CGG','AGA','AGG'] >>> S=['TCT','TCC','TCA','TCG','AGT','AGC'] >>> T=['ACT','ACC','ACA','ACG'] >>> V=['GTT','GTC','GTA','GTG'] >>> W=['TGG'] >>> Y=['TAT','TAC'] >>> aminoacids=['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V','W','Y'] >>> from collections import defaultdict >>> codondict=defaultdict(list) >>> for i in aminoacids: >>>... for j in i:(ALSO TRIED for j in list(i)) >>>... ... codondict[i]=j >>>... >>> codondict >>>defaultdict(<type 'list'>, {'A': 'A', 'C': 'C', 'E': 'E', 'D': 'D', 'G': 'G', 'F': 'F', 'I': 'I', 'H': 'H', 'K': 'K', 'M': 'M', 'L': 'L', 'N': 'N', 'Q': 'Q', 'P': 'P', 'S': 'S', 'R': 'R', 'T': 'T', 'W': 'W', 'V': 'V', 'Y': 'Y'})
0
[ 2, 544, 21, 9186, 37, 21, 968, 16, 7227, 800, 3726, 3726, 31, 57, 74, 2343, 20, 1465, 48, 70, 15, 31, 277, 14, 1448, 530, 44, 19, 14, 161, 31, 589, 544, 14, 968, 16, 7227, 9, 92, 1276, 448, 70, 60, 3669, 187, 51, 9264, 977...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple Custom Grid Control === I'm designing a [Point and Figure Charting][1] program, and my first version used the DataGridView control, which I found to be too big and bloated for my needs. All I need is a simple control that displays a square grid which will be filled with X's and O's. The data is parsed from yahoo finance as Open, High, Low, Close data, sorted by a set of rules and converted to an Int Array, which will correspond with the index of the rows, so the simpler the control is, and the less bloat is has the more efficient it will be when chewing through large amounts of data. I also need to be able to easily adjust the size of the squares in the grid, to zoom in and out of the data. I am unfamiliar with creating custom controls (But willing to learn), and I'm not having a lot of luck with the search terms I'm using, so any help pointing in the right direction would be appreciated. [1]: http://en.wikipedia.org/wiki/Point_and_figure_chart
0
[ 2, 1935, 5816, 7354, 569, 800, 3726, 3726, 31, 22, 79, 15026, 21, 636, 3132, 17, 1465, 22544, 500, 2558, 165, 500, 625, 15, 17, 51, 64, 615, 147, 14, 1054, 16375, 4725, 569, 15, 56, 31, 216, 20, 44, 266, 580, 17, 13, 7091, 166...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Database design for user driven website === Assuming I want to have a web application that requires storing user information, images, etc as well as storing status updates or posts/comments would I want to separate databases? For example if I have a "users" table that contains users information like passwords, emails, and typical social networking info like age, location etc. Would it be a good idea do create a second table("posts") that handles user content such as comments and/or post? Table one: "users" - UserID - Username - Age - etc. Table Two: "posts" - PostID - PostContent - PostAuthor - PostDate - etc Is this a valid organization? Furthermore if I wanted to keep track of media should I do this in ANOTHER table? Table Three: "media" - ID - Type - Uploader - etc. Any help is much appreciated. I'm curious to see if I'm on the right track or just completely lost. thanks in advance,
0
[ 2, 6018, 704, 26, 4155, 5355, 2271, 800, 3726, 3726, 11704, 31, 259, 20, 57, 21, 2741, 3010, 30, 4781, 25615, 4155, 676, 15, 3502, 15, 2722, 28, 134, 28, 25615, 1782, 16779, 54, 9868, 118, 960, 6601, 83, 31, 259, 20, 1725, 6018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Registering as a choice for the "Listen to ..." action/intent === I have a music player that I would like to make available as a choice when Android is asked to play a song. For example, in ICS 4.1, I can speak "listen to X" and a choice is given to handle the intent with either Youtube or Play Music. How can I find out what action this intent has and where in the manifest would I register to receive this intent?
0
[ 2, 2243, 68, 28, 21, 1837, 26, 14, 13, 7, 13891, 20, 13, 9, 9, 9, 7, 1028, 118, 6391, 2291, 800, 3726, 3726, 31, 57, 21, 232, 517, 30, 31, 83, 101, 20, 233, 904, 28, 21, 1837, 76, 13005, 25, 411, 20, 418, 21, 338, 9, 26,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I use Android to send PC a message & receive real-time === I have a server & a client. The client is my Android phone. The server is my PC running Windows. I'm needing to find out the best programmable method of sending a short string to the PC and having it displayed real-time. Please keep in mind the only languages I can program in on my server-side is VB.NET, C#, and C++ (and my experience with them is in that order). Thanks!
0
[ 2, 184, 92, 31, 275, 13005, 20, 2660, 5168, 21, 2802, 279, 2588, 683, 8, 891, 800, 3726, 3726, 31, 57, 21, 8128, 279, 21, 6819, 9, 14, 6819, 25, 51, 13005, 1132, 9, 14, 8128, 25, 51, 5168, 946, 1936, 9, 31, 22, 79, 12210, 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...
Active filter for backbone.js collections === I have a little problem with my backbone collection. I just want to display 6 models, and always the latest 6. I use CollectionBinder (Backbone.ModelBinder) to render and display my collections and I use RailsFayeSubscriber to sync them with the server. The problem is that I don't know how to always keep the collection 6 models big. I have tried adding a this.on("add") and there using .first(6) to keep the 6 models I want to have, but the problem is that I think either CollectionBinder or RailsFayeSubscriber also has add-trigger and throws me errors about missing models in the collection. The best thing would be to have something like comparator, that always sorts the model, but in this case some sort of active filter that always keeps it 6 models big. Any ideas?
0
[ 2, 1348, 11945, 26, 24036, 9, 728, 18, 5721, 800, 3726, 3726, 31, 57, 21, 265, 1448, 29, 51, 24036, 1206, 9, 31, 114, 259, 20, 3042, 400, 2761, 15, 17, 550, 14, 5736, 400, 9, 31, 275, 1206, 24200, 13, 5, 1958, 8640, 9, 13998, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I wire up IBOutlets to a custom UIView? === I have a view controller with generic interface elements that needs to load in a menu view. I have created a custom UIView called `MenuView.h` and `MenuView.m` and built all the views in it using code. However, I'd much rather set out the views in a .xib file so that I can lay them out more easily. I do know about the whole `loadNibNamed` in order to load a nib/xib file into my custom UIView, however what I don't understand is how I can wire up some IBOutlets to the loaded nib. Does anyone have any pointers to how this is done please?
0
[ 2, 184, 92, 31, 6511, 71, 13, 4598, 1320, 11045, 20, 21, 5816, 13, 5661, 4725, 60, 800, 3726, 3726, 31, 57, 21, 1418, 9919, 29, 12733, 6573, 2065, 30, 2274, 20, 6305, 19, 21, 11379, 1418, 9, 31, 57, 679, 21, 5816, 13, 5661, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 code for swap the backgrounds of two views doesn't work === i have 20 imageviews with background image set. When user clicks on one image and after on a second one, i would like that the two imageviews can swap their image background. With the code i built, i got that ONLY the first image clicked updates his background. <pre> private View z; //view for temporary save the first clicked image public ImageView[] images = new ImageView[20]; //array with my imageviews public void onClick(View v) { if (attivo == false) { attivo = true; z = v; //save the clicked view to a temporary one } else { //we enter here when we click on the second image //this cycles search inside the array which imageview //has the same ID of the saved one or the new one (the first/second image clicked) for (int h = 0; h<20; h++) { if (images[h].getId()== z.getId()) { images[h].setBackgroundDrawable(v.getBackground()); } } for (int h = 0; h<20; h++) { if (images[h].getId()== v.getId()) { images[h].setBackgroundDrawable(z.getBackground()); } } attivo = false; } } The first cycle works! set the second background to the first imageview clicked. The second cycle, even if the commands are executed, doesn't work! the background is always the original one. I know that i could do it in some different ways like use src instead of background, or gridviews. But please i would like to know why this code doesn't totally work.
0
[ 2, 51, 1797, 26, 17150, 14, 2395, 18, 16, 81, 4146, 1437, 22, 38, 170, 800, 3726, 3726, 31, 57, 434, 1961, 4725, 18, 29, 2395, 1961, 309, 9, 76, 4155, 10840, 18, 27, 53, 1961, 17, 75, 27, 21, 153, 53, 15, 31, 83, 101, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
amazon dynamodb through rest api === which are the required headers we need to send in the header using dynamodb rest api 'x-amz-date': 'Mon, 16 Jan 2012 17:50:52 GMT', 'x-amzn-authorization': 'AWS3 AWSAccessKeyId=TemporaryAccessKeyID,Algorithm=HmacSHA256,SignedHeaders=Host;x-amz-date;x-amz-target;x-amz-security-token,Signature=*Signature Value*=', 'Date': 'Mon, 31 Oct 2011 17:49:52 GMT', 'x-amz-target': 'DynamoDB_20111205.GetItem', 'x-amz-security-token': '*Token Value*', 'Content-Type': 'application/x-amz-json-1.0', 'Content-Length': '135', 'Connection': 'Keep-Alive', 'User-Agent': 'aws-sdk-java/1.2.10 Windows_7/6.1 Java_HotSpot(TM)_64-Bit_Server_VM/20.2-b06', } can i know what are all the required parameters we need to pass through http rest api for dynamo ... I need to fetch the data from dynamodb database??? can anyone suggest what are required headers http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/UsingJSON.html
0
[ 2, 8059, 18120, 9007, 120, 760, 21, 2159, 800, 3726, 3726, 56, 50, 14, 1390, 157, 445, 95, 376, 20, 2660, 19, 14, 157, 106, 568, 18120, 9007, 760, 21, 2159, 13, 22, 396, 8, 765, 380, 8, 8209, 22, 45, 13, 22, 2111, 15, 347, 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...
matlab - dot product of vector field and scalar field === I have a vector field: >> crossfield crossfield(:,:,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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 crossfield(:,:,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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 crossfield(:,:,3) = Columns 1 through 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 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -.5 0 0 0 0 0 0 0 0 0 2.5 0 0 0 -.25 0 0 0 0 0 0 0 0 2.5 0 0 0 -.25 0 0 0 0 0 0 0 0 .5 0 0 -.5 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and I want to create a temporary vector field which takes the distance of a pixel to all the other pixels in my current vector field and then multiplies by the values in the crossfield. Then i want to sum up the results for each pixel. Thi swill involve a cell array I'd imagine. so for example pixel(1,1) of my temp field will look like: tempfield(1,1) = NaN 1 2 3 5 ........10 1 1.24 2 1.46 3 1.69 4 5 . . 10 and pixel 2 might look like: tempfield(1,2) = 1 NaN 1 2 3 ........10 1.24 1 1.24 1.36 2 1.36 1.55 4 1.55 . 5 . . . . 12.78 10 and then i want multply each of these matrices (14x14 of them, the size of cross field) with crossfield. so here i'd imagine having a cell array with 14x14 matrices. I then want to sum all the values in each cell, so that I left with a 14x14x3 vector field. Here is my attempt so far: [h,w,d] = size(crossfield); % Distance matrix for pxRow = 1:h % fixed pixel row for pxCol = 1:w % fixed pixel column for pxDep = 1:d for r = 1:h % row of distant pixel for c = 1:w % column of distant pixel for dep = 1:d rfield(c,r,d) = sqrt((r-pxRow)^2 + (c-pxCol)^2 + (d-pxDep^2)); % pythagoras theorem to get distance to each pixel bfield(c,r,d) = crossfield(c,r,d)./rfield(c,r,d).^2; end end end Bfield(i) = {bfield}; % filling a cell array with results. read below i = i+1; end end end Bfield = reshape(Bfield, w, h,d); bcell = cellfun(@(bfield)nansum(bfield(:)), Bfield,'un', 0); bmat = cell2mat(bcell); ??? Error using ==> reshape To RESHAPE the number of elements must not change. so where am I going wrong? also previous attempts have lead to a final vector field of all zero's.
0
[ 2, 4277, 9086, 13, 8, 14123, 2374, 16, 7497, 575, 17, 28960, 575, 800, 3726, 3726, 31, 57, 21, 7497, 575, 45, 13, 1, 919, 1109, 919, 1109, 5, 45, 15, 45, 15, 165, 6, 800, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 send email to an array of email fetched from database with other data === I have been having problem using phpmailer to send bulk emails, no problem with a single email though. here is my code: $result = mysql_query("select * from $to",$conn) or die("list selected ($to) does not exist ".mysql_error()); while ($row = mysql_fetch_array($result)) { $email[] = $row['email']; $student[] = $row['name']; } foreach ($email as $val => $uemail) { $email = $uemail; $students= $student[$val] ; require("class.phpmailer.php"); $mail = new PHPMailer(true); try { $mail->AddReplyTo('info@bratim.com', 'My Name'); $mail->AddAddress("$email", "$student"); $mail->SetFrom('info@me.com', 'MyName'); $mail->AddReplyTo('info@me.com', 'My nameg'); $mail->Subject = "$sub"; $mail->MsgHTML("Dear $student<br> $msg <br> <img src=\"$path\"> <p> $host_upper ______________________________________________________ THIS IS AN AUTOMATED RESPONSE. ***DO NOT RESPOND TO THIS EMAIL**** "); $mail->AddAttachment("$path2"); // attachment $mail->Send(); echo "Message Sent OK to $email </p>\n"; } catch (phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! } } Any help, suggestion will be appreciated.
0
[ 2, 184, 107, 31, 2660, 8517, 20, 40, 7718, 16, 8517, 13, 28998, 37, 6018, 29, 89, 1054, 800, 3726, 3726, 31, 57, 74, 452, 1448, 568, 13, 26120, 8079, 106, 20, 2660, 7238, 8517, 18, 15, 90, 1448, 29, 21, 345, 8517, 362, 9, 235,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
fetching android app's information in PHP === I've been looking for some mechanism through which I can fetch android app's information such as app's ID in market, it's category, pricing, its icon and likewise from Google Play. I know there's a facility for App store for iOS, in which we can fetch app's information through URL below, which returns us back JSON of it: http://itunes.apple.com/search?media=software&term=[query_word] I need same for Android Market. Is there any URL for doing the same? thanks in advance.
0
[ 2, 18312, 68, 13005, 4865, 22, 18, 676, 19, 13, 26120, 800, 3726, 3726, 31, 22, 195, 74, 699, 26, 109, 6534, 120, 56, 31, 92, 18312, 13005, 4865, 22, 18, 676, 145, 28, 4865, 22, 18, 4924, 19, 1135, 15, 32, 22, 18, 3230, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sorting a Query in Solrj with whitespace === I'm using solr querying some documents. In this one case I don't want to order the results by relevance, I want them to be sorted by title. I've done the following in solrj: //sort by title setSortField("title", SolrQuery.ORDER.asc) This works fine, when there are no whitespaces or slashes in the titles of the documents. When I have 4 documents, the title values are ordered like that: "A" "B" "C" "B D" It seems to me, that Solr starts ordering from a field after the first whitespace in it. Any ideas why this happens?
0
[ 2, 2058, 68, 21, 25597, 19, 7176, 23008, 29, 359, 5582, 800, 3726, 3726, 31, 22, 79, 568, 7176, 139, 25597, 68, 109, 4374, 9, 19, 48, 53, 610, 31, 221, 22, 38, 259, 20, 389, 14, 1736, 34, 24144, 15, 31, 259, 105, 20, 44, 225...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sorting any kind of element using void pointers in C === Hello everyone i am writing a program for sorting general element in C. it can sort any type of object(int,float,complex number, objects) What i have thought of is using void pointers, void qsort(void *ptr,int sz,int i,int j,int (*fptr) (const void *,const void *) ) { if(i<j) { int p=(i+j)/2; p=partition(ptr,sz,i,j,p,fptr); qsort(ptr,size,i,p-1,fptr); qsort(ptr,size,p+1,j,fptr); } } FOR Comparison By the value of sz we will know that whether its a pointer to string,int,char,float,etc int compare(const void* a,const void* b,int sz) { if(sz==0) //means pointer to a string return strcmp( (char*)a, (char*)b ); else if(sz==1) //means int return *(int*)a - *(int*)b; else if(sz==2) //means float return *(float*)a- *(float*)b; else if(sz==3) return *(char*)a- *(char*)b; } FOR SWAPPING TWO ELEMENTS void swap(void *a,void *b,int sz)//for swapping { if(sz==0) { void *c; c=a; a=b; b=c; } else if(sz==1) { a=(int*)a; b=(int*)b; int c; c= *a; *a=*b; *b=c; } else if(sz==2) { a=(float*)a; b=(float*)b; float c; c= *a; *a=*b; *b=c; } The full code is under construction, please tell me if there could be some optimizations in my approach, or some better alternatives for this problem. As it seems to me that it is really going to be big in size Many many thanx in advance
0
[ 2, 2058, 68, 186, 825, 16, 4520, 568, 11364, 454, 445, 19, 272, 800, 3726, 3726, 10975, 1266, 31, 589, 1174, 21, 625, 26, 2058, 68, 297, 4520, 19, 272, 9, 32, 92, 2058, 186, 1001, 16, 3095, 5, 6391, 15, 14712, 721, 15, 960, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can we use Hadoop and any NoSQL database with Android instead of SQLite === Can anyone kindly tell that can we use Hadoop and any NoSQL database like MongoDB tec with Android instead of SQLite. And if yes then how to do that (I mean what is the process to do so), because SQLite is embedded in Android and for MongoDB etc will we have to use separate Server etc or it can be used as embedded.
0
[ 2, 92, 95, 275, 41, 21709, 17, 186, 90, 18, 22402, 6018, 29, 13005, 700, 16, 4444, 10601, 800, 3726, 3726, 92, 1276, 22215, 494, 30, 92, 95, 275, 41, 21709, 17, 186, 90, 18, 22402, 6018, 101, 3521, 5474, 220, 13, 9568, 29, 13005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java Swing Timer with SQL === I'm trying to setup a thread that loops every 100ms with every iteration querying a table in a SQL database. Here is what I have in my public static void main class. How can I define the connection outside of the listener and only call the query in the loop? // Database credentials final String url = "jdbc:mysql://192.168.0.0/"; final String db = "db"; final String driver = "com.mysql.jdbc.Driver"; final String table = "table"; public final Connection conn = null; // Define listner ActionListener taskPerformer = new ActionListener() { public void actionPerformed(ActionEvent evt) { //...Perform a task... System.out.println("Reading Info."); try { Class.forName(driver); try { conn = DriverManager.getConnection(url+db,"root","pass"); Statement st = (Statement) conn.createStatement(); String sql = ""; st.executeUpdate(sql); conn.close(); } catch (SQLException s) { s.printStackTrace(); JOptionPane.showMessageDialog(null, "ERROR: Please try again!"); } } catch (ClassNotFoundException cnfe){ JOptionPane.showMessageDialog(null, "ERROR:"); } } }; Timer timer = new Timer( 100 , taskPerformer); timer.setRepeats(true); timer.start(); Thread.sleep(100); } Right now it's giving me the following error: Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem: The final local variable conn cannot be assigned, since it is defined in an enclosing type
0
[ 2, 8247, 5587, 85, 139, 29, 4444, 255, 800, 3726, 3726, 31, 22, 79, 749, 20, 18161, 21, 9322, 30, 19661, 352, 808, 79, 18, 29, 352, 23534, 25597, 68, 21, 859, 19, 21, 4444, 255, 6018, 9, 235, 25, 98, 31, 57, 19, 51, 317, 120...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 struggles to scrape one domain === I have already checked out this question http://stackoverflow.com/questions/8855361/fb-opengraph-ogimage-not-pulling-images-possibly-https, and it sounds like he's describing the same exact problem as me except for a few things: 1) I'm not running on https 2) 80% of the time I try to debug, I get this message " Error parsing input URL, no data was scraped." 3) The scraper works perfectly on a different domain, but same server, same theme with almost identical content. Every time I try a domain it scrapes it perfectly including the image During the 20% that it actually scrapes my page, I am having the same issue in the above link. It is reading my thumbnail, yet showing a blank image. The link brings me to a working image but it doesn't want to show anything. The weird part is it worked completely fine about 10 months ago when I updated this blog on a daily basis. The only difference is I've switched servers recently. While that would explain a possibility, the other domain switched as well and doesn't have this problem. I am at a loss why my links either show no image at all in facebook or give me the: Domain Link Domain (no image, no description) Very frustrating situation. Does anyone have any suggestions?
0
[ 2, 9090, 13131, 20, 23855, 53, 4603, 800, 3726, 3726, 31, 57, 614, 6505, 70, 48, 1301, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 3020, 4083, 26424, 118, 13478, 8, 10157, 9614, 8, 5598, 22039, 8, 1270, 8, 23289, 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...
CSV remove field value wrap quotes === I'm attempting to write a list to a csv, however when I do so I get wrapper quotes around my field values: number1,number2 "1234,2345" "1235.7890" "2345.5687" Using this code: with open('C:\\temp\\test.csv', 'wb') as out_file: ... csv_writer = csv.writer(out_file, delimiter=',') ... csv_writer.writerow(('number1','number2')) ... for f in myList: ... csv_writer.writerow(f) After further research, I found that you can remove the writing of quotes by using: > quotechar='', quoting=csv.QUOTE_NONE When I apply this to my code I get this error: > Traceback (most recent call last): File "<interactive input>", line > 4, in <module> Error: need to escape, but no escapechar set with open('C:\\temp\\test.csv', 'wb') as out_file: ... csv_writer = csv.writer(out_file, delimiter=',',quotechar='', quoting=csv.QUOTE_NONE) csv_writer.writerow(('number1','number2')) ... for f in myList: ... csv_writer.writerow(f) How do I remove these quotes? Thank You!
0
[ 2, 272, 18, 710, 4681, 575, 1923, 8118, 18901, 800, 3726, 3726, 31, 22, 79, 6314, 20, 2757, 21, 968, 20, 21, 272, 18, 710, 15, 207, 76, 31, 107, 86, 31, 164, 28051, 18901, 140, 51, 575, 4070, 45, 234, 165, 15, 16299, 135, 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...
parameter function in jquery === i want to make function with parameter. i working with below code but it is not working. can anyone tell me what am i doing wrong. <head> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript"> $(function hide(fn){ $(fn).click(function(){ $('div').hide() }) }) </script> <style> div { width:500px; height:500px; background:#FF0000; } </style> </head> <body> <button onclick="hide(this)">click for hide</button> <a href="#">click</a> <button>click</button> <div></div> </body>
0
[ 2, 18906, 1990, 19, 487, 8190, 93, 800, 3726, 3726, 31, 259, 20, 233, 1990, 29, 18906, 9, 31, 638, 29, 1021, 1797, 47, 32, 25, 52, 638, 9, 92, 1276, 494, 55, 98, 589, 31, 845, 1389, 9, 13, 1, 1743, 1, 13, 1, 8741, 1001, 37...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 find doubles with SQL? === Using the [Chinook Test Database][1] I wrote this SQL statement to show all the tracks ordered by two specific customers: SELECT inv.BillingCity,cus.LastName,tra.Name FROM invoice AS inv JOIN customer AS cus ON inv.CustomerId=cus.CustomerId JOIN invoiceline inl ON inv.InvoiceId=inl.InvoiceId JOIN track tra ON tra.TrackId=inl.TrackId WHERE cus.LastName IN ('Schneider','Schröder') ORDER BY inv.BillingCity,cus.LastName,tra.Name I see that there is a track that was ordered twice by one customer: ![enter image description here][2] **How would I write an SQL statement to find doubles like this, i.e. "return all tracks ordered multiple times by one customer"?** [1]: http://chinookdatabase.codeplex.com/ [2]: http://i.stack.imgur.com/IkNYm.png
0
[ 2, 184, 20, 477, 7784, 29, 4444, 255, 60, 800, 3726, 3726, 568, 14, 636, 18892, 3085, 1289, 6018, 500, 2558, 165, 500, 31, 738, 48, 4444, 255, 3331, 20, 298, 65, 14, 1633, 1905, 34, 81, 1903, 5279, 45, 5407, 19, 710, 9, 9580, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SQL Query for reservation dates that break a month end? === I'm using a custom PHP function to produce a visual calendar for a **single month** that blocks out dates based on a table that contains an start date, and an duration - For example: ![Calendar Example][1] ...This is produced by data saying that the table should be blocked out for 4 days from the 14th, and 7 days from the 27th. The query looks something like this: SELECT GROUP_CONCAT(DATE_FORMAT(start_date,'%d'),':', event_duration) AS info FROM events WHERE YEAR(start_date = '2012' AND MONTH(start_date) = '07' ORDER BY start_date (You could safely ignore the group concat and return the data as individual rows, that doesn't really matter). I'm looking for a modification to the query that would block out dates at the start of the month IF an event starts in the previous month, but its length takes it into the following. For instance - in the above example, the event on the 27th is actually scheduled to last 7 days in the database, so if I ran the query for `MONTH(start_date) = '08'` I'd like to say the first two dates blocked out, which they wouldn't currently be, because the start date that would block it out is not in the month being selected. I'm fairly sure there's a subquery or something in there to grab the rows, but I just can't think of it. Any takers? [1]: http://i.stack.imgur.com/jVCjZ.jpg
0
[ 2, 4444, 255, 25597, 26, 8733, 4076, 30, 1442, 21, 1617, 241, 60, 800, 3726, 3726, 31, 22, 79, 568, 21, 5816, 13, 26120, 1990, 20, 2213, 21, 3458, 7036, 26, 21, 13, 1409, 14031, 1617, 1409, 30, 5198, 70, 4076, 432, 27, 21, 859, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
passing ID to click event === I have the following input inside an asp.net repeater <div class="detailsItem"> <input type="button" class="saveCommand" value="Save"/> </div> then within my document.ready I bind a click function <script type="text/javascript"> $(document).ready(function () { $('.saveCommand').live('click', function () { var cur = $(this); saveItem(cur.closest('div.detailsItem')); }); }); When I'm binding my repeater, i want to be able to include an ID in call to the `click` function. something similar to: <input type="button" onclikc="save(this,<%#((CustomViewItem)Container.DataItem).Id%>" value="Save"/> Any idea on how to combine the two styles of binding?
0
[ 2, 2848, 4924, 20, 10840, 807, 800, 3726, 3726, 31, 57, 14, 249, 6367, 572, 40, 28, 306, 9, 2328, 6830, 106, 13, 1, 12916, 718, 3726, 7, 546, 8682, 9097, 79, 7, 1, 13, 1, 108, 4881, 1001, 3726, 7, 811, 444, 7, 718, 3726, 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...
jQuery and php registration script not working === I'm developing a user registration and login for a an app using jQuery and php. I am having trouble inserting a record into my members database. When I click submit I'm getting the "Not Registered" alert., it just takes me back to the registration page. My jQuery handle for the submit button and the HTML: $('#regsubmit').click(function(){ $.post("register.php",{reguser: $("#reguser").val(), fname: $("#fname").val(),lname: $("#lname").val(),regpass: $("#regpass").val(), regemail: $("#regemail").val()},function(data){ if(data == true){ alert("Registered"); }else{ alert("Not Registered"); } }); }); <div data-role="content"> <div data-role="collapsible"><h2>Register</h2> <form action="" method="post" id="registrationform"> <div data-role="fieldcontain"> <label for="fname">First name:</label> <input type="text" name="fname" id="fname" value="" /> <div id="fnamecheck"></div> </div> <div data-role="fieldcontain"> <label for="lname">Last name:</label> <input type="text" name="lname" id="lname" value="" /> <div id="lnamecheck"></div> </div> <div data-role="fieldcontain"> <label for="regemail">Email:</label> <input type="email" name="regemail" id="regemail" value="" /> <div id="emailcheck"></div> </div> <div data-role="fieldcontain"> <label for="reguser">Username:</label> <input type="text" name="reguser" id="reguser" value="" /> <div id="usernamecheck"></div> </div> <div data-role="fieldcontain"> <label for="regpass">Password:</label> <input name="regpass" type="password" id="regpass" value=""> <div data-role="fieldcontain"><label for="confirmregpass">Confirm Password:</label> <input name="confirmregpass" type="password" id="confirmregpass" value=""></div> </div> <input name="regsubmit" type="submit" id="regsubmit" value="Register" data-icon="check" data-theme="a"/> </form> </div> And my register.php: <?php $MYSQL_SERVER = "localhost"; $MYSQL_USER = "root"; $MYSQL_PASSWORD = "password"; $db = mysql_connect($MYSQL_SERVER, $MYSQL_USER, $MYSQL_PASSWORD ) or die(mysql_error()); mysql_select_db("hedonsof_conflict") or die(mysql_error()); $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['regemail']; $reguser = $_POST['reguser']; $regpass = $_POST['regpass']; //Username check $usercheck = mysql_query("SELECT * FROM members WHERE username='".$reguser."'"); if(empty($fname)||empty($lname)||empty($email)||empty($reguser)||empty($regpass)){ if(empty($fname)){ $errors[] = "Missing first name."; } if(empty($lname)){ $errors[]= "Missing last name."; } if(empty($email)){ $errors[]= "Missing email."; } if(empty($reguser)){ $errors[]= "Missing user name."; } if(empty($regpass)){ $errors[] = "Missing password."; } }elseif(!filter_var($email, FILTER_VALIDATE_EMAIL)){ $errors = "Not a valid eail address."; }else{ $fname = strip_tags($fname); $fname = stripslashes($fname); $fname = trim($fname); $lname = strip_tags($lname); $lname = stripslashes($lname); $lname = trim($lname); $email = strip_tags($email); $email = stripslashes($email); $email = trim($email); $reguser = strip_tags($reguser); $reguser = stripslashes($reguser); $reguser = trim($reguser); $regpass = strip_tags($regpass); $regpass = stripslashes($regpass); $regpass = trim($regpass); $sql = mysql_query("INSERT INTO members (username, fname, lname, password, email) VALUES('$reguser','$fname','$lname','$regpass','$email)") or die(mysql_error()); $msg = "Thanks for Registering."; if($msg){ echo true; }else{ $errors[] = "Sorry error with database at this time."; echo $errors; } } ?>
0
[ 2, 487, 8190, 93, 17, 13, 26120, 8587, 3884, 52, 638, 800, 3726, 3726, 31, 22, 79, 3561, 21, 4155, 8587, 17, 6738, 108, 26, 21, 40, 4865, 568, 487, 8190, 93, 17, 13, 26120, 9, 31, 589, 452, 2572, 14692, 68, 21, 571, 77, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Highlight the text === How we highlight the whole div text element when click them. I use the following code $("#ques22").css("background-color","#3BB9FF"); The ques22 is my div id. It also change the color of the image with in the div element.
0
[ 2, 14373, 14, 1854, 800, 3726, 3726, 184, 95, 14373, 14, 979, 13, 12916, 1854, 4520, 76, 10840, 105, 9, 31, 275, 14, 249, 1797, 5579, 5, 7, 5910, 13655, 2287, 7, 6, 9, 6824, 18, 5, 7, 1958, 8810, 8, 11282, 7, 15, 7, 5910, 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...
Is there a way to get RSS feed of facebook page? === Problem: I want to display the posts from my facebook page on a PHP page.[When there is a new post on the facebook page, my PHP page should also render the same] Way1: If there is a way to get a RSS feed of the facebook page i can parse the RSS and display it in the PHP page. **But i am not able to find a way to get the RSS feed.** Way2:Another way is to use FB Api. But what API can i use? Never worked with facebook API's so any help would be great. Any other way to solve the problem is welcome!
0
[ 2, 25, 80, 21, 161, 20, 164, 13, 1224, 18, 4063, 16, 9090, 2478, 60, 800, 3726, 3726, 1448, 45, 31, 259, 20, 3042, 14, 9868, 37, 51, 9090, 2478, 27, 21, 13, 26120, 2478, 9, 2558, 3185, 80, 25, 21, 78, 678, 27, 14, 9090, 2478...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Changing Map Modes in Bing WPF control === Here is my XAML Code: <s:SurfaceWindow x:Class="map_test.SurfaceWindow1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008" xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="1080" Width="1920" WindowStartupLocation="CenterScreen"> <Grid> <m:Map x:Name="NotreDameMap" CredentialsProvider="AmNh-jzPEmrdpc2T2wBxEjyB0fvSimavosz4B4_IPEAY4RDE-r7L2rHa439uEzlz" Mode="AerialWithLabels" Center="41.702380,-86.234168" ZoomLevel="16" > <Canvas Width="175.198" Height="85" m:MapLayer.Position="41.702380,-86.234168" m:MapLayer.PositionOrigin="BottomCenter" Opacity="0.75"> <!-- Layer 1/<Group>/<Path> --> <Path StrokeThickness="0.2" Stroke="#ffec008b" StrokeMiterLimit="1.0" Data="F1 M 122.944,144.000"/> <!-- Layer 1/<Group>/<Path> --> <Path StrokeThickness="0.2" Stroke="#ffec008b" StrokeMiterLimit="1.0" Data="F1 M 65.081,47.477"/> <!-- Layer 1/<Group>/<Group>/<Compound Path> --> <Path Fill="#ff0e223e" Data="F1 M 159.484,130.991 L 158.570,130.991 L 158.570,128.309 C 158.791,128.277 159.073,128.247 159.484,128.247 C 160.901,128.247 161.408,128.941 161.408,129.636 C 161.408,130.609 160.523,130.991 159.484,130.991 Z M 161.187,131.494 L 161.187,131.432 C 162.036,131.180 162.732,130.547 162.732,129.505 C 162.732,128.750 162.479,128.213 162.006,127.866 C 161.532,127.521 160.744,127.269 159.544,127.269 C 158.600,127.269 157.968,127.364 157.306,127.457 L 157.306,135.373 L 158.570,135.373 L 158.570,131.965 L 159.453,131.965 C 160.459,131.965 160.964,132.347 161.155,133.355 C 161.312,134.396 161.502,135.122 161.693,135.373 L 163.019,135.373 C 162.890,135.122 162.700,134.646 162.511,133.420 C 162.354,132.251 161.879,131.623 161.187,131.494 Z"/> <!-- Layer 1/<Group>/<Group>/<Compound Path> --> <Path Fill="#ff0e223e" Data="F1 M 154.433,89.842 L 149.441,95.128 L 144.158,95.128 L 144.158,47.566 L 149.441,47.566 L 154.433,52.852 L 154.433,89.842 Z M 123.018,95.128 L 120.080,95.128 L 91.603,47.566 L 123.018,47.566 L 123.018,95.128 Z M 62.242,95.128 L 62.232,95.128 L 62.232,47.566 L 65.170,47.566 L 93.646,95.128 L 62.242,95.128 Z M 41.101,95.128 L 31.693,95.128 L 31.693,47.566 L 41.101,47.566 L 41.101,95.128 Z M 157.372,26.423 L 144.158,26.423 L 144.158,21.138 L 157.372,21.138 L 157.372,0.000 L 109.807,0.000 L 109.807,21.138 L 123.018,21.138 L 123.018,26.423 L 78.677,26.423 L 62.242,0.000 L 27.892,0.000 L 27.892,21.138 L 41.101,21.138 L 41.101,26.423 L 0.000,26.421 L 0.000,47.737 L 10.571,47.737 L 10.571,95.299 L 0.000,95.299 L 0.000,116.276 L 40.808,116.265 L 40.808,121.550 L 27.609,121.550 L 27.609,142.688 L 75.453,142.688 L 75.453,121.550 L 62.242,121.550 L 62.242,116.265 L 106.345,116.265 L 122.165,142.688 L 144.158,142.688 L 144.158,116.265 L 157.372,116.265 L 175.598,97.774 L 175.598,44.921 L 157.372,26.423 Z"/> <!-- Layer 1/<Group>/<Group>/<Compound Path> --> <Path Fill="#ff0e223e" Data="F1 M 159.925,137.267 C 156.771,137.267 154.215,134.617 154.215,131.241 C 154.215,127.928 156.771,125.251 159.895,125.251 L 159.925,125.251 C 163.079,125.251 165.602,127.928 165.602,131.272 C 165.602,134.617 163.079,137.299 159.925,137.267 Z M 159.925,124.146 L 159.895,124.146 C 156.014,124.146 152.859,127.300 152.859,131.241 C 152.859,135.248 156.014,138.373 159.895,138.373 C 163.802,138.373 166.896,135.248 166.896,131.241 C 166.896,127.300 163.802,124.146 159.925,124.146 Z"/> <TextBlock FontSize="9" Foreground="White" Margin="65" TextAlignment="Center"> Hesburgh<LineBreak /> Library <LineBreak /> </TextBlock> </Canvas> </m:Map> <StackPanel> <ToggleButton x:Name="toggleButton" Content="Change Map Mode"/> <TextBlock Text="Maps" /> </StackPanel> </Grid> </s:SurfaceWindow> Quite simply i am trying to create a button that will change the mode of the map from AerialWithLabels to Road mode. any help will be appreciated. P.S sorry if its a fairly basic question I am new to coding
0
[ 2, 4226, 2942, 12770, 19, 18080, 619, 7721, 569, 800, 3726, 3726, 235, 25, 51, 13, 6791, 8184, 1797, 45, 13, 1, 18, 45, 18830, 27508, 993, 45, 1898, 3726, 7, 15022, 1, 10543, 9, 18830, 27508, 165, 7, 23504, 2172, 3726, 7, 21127, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Pass Bitmaps into Background worker threads === I know Bitmaps are not threadsafe, and hence using this workaround Bitmap[] blobCopies = MakeBlobCopies(bmpBlob, 2); BackgroundWorker bw1 = new BackgroundWorker(); bw1.DoWork += new DoWorkEventHandler(bw1_DoWork); bw1.RunWorkerAsync(blobCopies[0]); BackgroundWorker bw2 = new BackgroundWorker(); bw2.DoWork += new DoWorkEventHandler(bw2_DoWork); bw2.RunWorkerAsync(blobCopies[1]); DisposeBlobCopies(blobCopies); In the Backgroundwork event handle , I apply some filters to the bitmaps but I get the an Access Violation Exception ---------- System.AccessViolationException was unhandled Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=System.Drawing StackTrace: at System.Drawing.SafeNativeMethods.Gdip.GdipBitmapLockBits(HandleRef bitmap, GPRECT& rect, ImageLockMode flags, PixelFormat format, BitmapData lockedBitmapData) at System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData) at System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format) ---------- I am not even disposing the bitmaps (which I would need to avoid choking up memory). BUt still get this exception. I do *not* need to return anything from the worker thread, the Is this the right away to even approach this? Any ideas?
0
[ 2, 1477, 1142, 15022, 18, 77, 2395, 7444, 20396, 800, 3726, 3726, 31, 143, 1142, 15022, 18, 50, 52, 9322, 18166, 15, 17, 5796, 568, 48, 170, 10037, 1142, 15022, 2558, 500, 334, 10904, 9734, 1596, 800, 233, 7091, 220, 9734, 1596, 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...
How can I capture what content a mouse has highlighted/selected in Windows? === People often highlight/select texts, e.g. in Webbrowser or in a word document. Normally in a Webbrowser, people first select some texts then they might click right mouse button for context menu. I don't care about the context menu. What I want to do is to program an application, which is able to track your mouse activity globally, not within the application. For example, if you select some texts within a webbrowser or word/pdf/txt document, then the application should know what text you have selected with your mouse. Is it possible to do this in Windows?
0
[ 2, 184, 92, 31, 3683, 98, 2331, 21, 7567, 63, 12528, 118, 18, 7138, 19, 1936, 60, 800, 3726, 3726, 148, 478, 14373, 118, 18, 16964, 6381, 15, 13, 62, 9, 263, 9, 19, 10192, 5417, 4104, 54, 19, 21, 833, 4492, 9, 4147, 19, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get button part of file input element using jQuery? === I have a file input element as in code below. How would I get the button part of this file input control using jQuery? <input type="file" name="FILE1" id="FILE1"></input>
0
[ 2, 164, 5167, 141, 16, 3893, 6367, 4520, 568, 487, 8190, 93, 60, 800, 3726, 3726, 31, 57, 21, 3893, 6367, 4520, 28, 19, 1797, 1021, 9, 184, 83, 31, 164, 14, 5167, 141, 16, 48, 3893, 6367, 569, 568, 487, 8190, 93, 60, 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 come SPPlaylistFolder doesn't conform to SPAsyncLoading? === I'm using CocoaLibSpotify 2.0 for my app. With the 2.0 version of CLS, a bunch of objects conform to the `SPAsyncLoading` protocol, allowing you to use ´-waitUntilLoaded:...´. But `SPPlaylistFolder` doesn't conform to the protocol – does that mean that all its metadata is loaded as soon as I get hold of the instance or do I have to use KVO on its properties? Is there a reason as to why `SPPlaylistFolder` doesn't conform to the `SPAsyncLoading` protocol?
0
[ 2, 184, 340, 3782, 5438, 5739, 8814, 106, 1437, 22, 38, 13620, 20, 6954, 9507, 150, 16866, 60, 800, 3726, 3726, 31, 22, 79, 568, 24507, 8326, 18, 4296, 8612, 172, 9, 387, 26, 51, 4865, 9, 29, 14, 172, 9, 387, 615, 16, 10842, 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...
What is Webscr? === I've noticed on PayPal, they have Webscr as well as on many other sites. It seems to be written in C++ or Perl as it is in cgi-bin. What is this and what does it do? What programming language is it in?
0
[ 2, 98, 25, 2741, 18, 6711, 60, 800, 3726, 3726, 31, 22, 195, 2711, 27, 1372, 6720, 15, 59, 57, 2741, 18, 6711, 28, 134, 28, 27, 151, 89, 3259, 9, 32, 2206, 20, 44, 642, 19, 272, 20512, 54, 416, 255, 28, 32, 25, 19, 272, 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...
Display a message in the font type and size selected by the user from two listboxes === I have been working on this project for a few days, it’s a C# Windows Visual Studio 2010 form and I have been posting different questions that relate to the same project; as I was told to post different questions instead on having them all in the same post. So this is the project: create a form with two ListBoxes—one contains at least four font names and the other contains at least four font sizes. Let the first item in each list be the default selection if the user fails to make a selection. Allow only one selection per ListBox. After the user clicks a button, display "Hello" in the selected font and size. This time I’m having a problem getting the message in the textbox to display according to the font type and size that the user selected. Here is where I’m at in the coding: public Form1() { InitializeComponent(); //populate listbox1 listBox1.Items.Add("Arial"); listBox1.Items.Add("Calibri"); listBox1.Items.Add("Times New Roman"); listBox1.Items.Add("Verdana"); //populate listbox2 listBox2.Items.Add("8"); listBox2.Items.Add("10"); listBox2.Items.Add("12"); listBox2.Items.Add("14"); this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); listBox1.SelectedIndex = 0; // <--- set default selection for listBox1 this.listBox2.SelectedIndexChanged += new System.EventHandler(this.listBox2_SelectedIndexChanged); listBox2.SelectedIndex = 0; // <--- set default selection for listBox2 } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { textBox1.Text = listBox1.SelectedItem.ToString(); } private void listBox2_SelectedIndexChanged(object sender, EventArgs e) { textBox1.Text = listBox2.SelectedItem.ToString(); } private void textBox1_TextChanged(object sender, EventArgs e) { textBox1.Text = "Hello!"; } private void button1_Click(object sender, EventArgs e) { } } } Now I'm trying to elicit a call from a button clicked that will display the message "Hello" in the user’s choice of font and font size. Any suggestions would be greatly appreciated.
0
[ 2, 3042, 21, 2802, 19, 14, 9978, 1001, 17, 1072, 1704, 34, 14, 4155, 37, 81, 968, 5309, 160, 800, 3726, 3726, 31, 57, 74, 638, 27, 48, 669, 26, 21, 310, 509, 15, 32, 1, 18, 21, 272, 5910, 1936, 3458, 1120, 498, 505, 17, 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 create custom SQL Propel Task for Symfony Task? === I want to insert data into a Table with a for-loop. First of all I have create a Symfony Task with: `symfony generate:task namespace:MyTask` now i'm trying to generate a propel sql task that i can call into my Symfony Task so that when i call : `symfony namespaceMyTask` it insert an amount of `for(i=10; i < 30; i++)` Data into a Table. How can i create a custom propel task that can be call into a symfony task?
0
[ 2, 184, 20, 1600, 5816, 4444, 255, 17799, 3005, 26, 13, 7261, 10229, 93, 3005, 60, 800, 3726, 3726, 31, 259, 20, 14692, 1054, 77, 21, 859, 29, 21, 26, 8, 18786, 9, 64, 16, 65, 31, 57, 1600, 21, 13, 7261, 10229, 93, 3005, 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...
Change Button Border Properties on IBAction === Why does this allow me to change the **bordered state** but not the **border width** (or other border properties)? NSButton *button = (NSButton *)sender; [button setBordered:false]; [button setBorderWidth:5];
0
[ 2, 753, 5167, 1862, 3704, 27, 13, 4598, 8645, 800, 3726, 3726, 483, 630, 48, 1655, 55, 20, 753, 14, 13, 1409, 24389, 69, 146, 1409, 47, 52, 14, 13, 1409, 24389, 9456, 1409, 13, 5, 248, 89, 1862, 3704, 6, 60, 13, 2172, 811, 444...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Meteor: Passing more than one value to a template === I want to create a template/js combo similar to the ones below. What I would like is to have two variables available to the 'collection' template <template name="collection"> Title: {{title}} <UL> {{#each items}} {{> item}} {{/each}} </UL> </template> <template name="collection_items"> <LI>{{item_title}}</LI> </template> Where the javascript function would be something like: Template.collection.data = function() { var record = Record.findOne({whatever:value}); return { title: record.title, items: record.items } } I've tried using Handlebars' {{#with data}} helper and return an object as above, but that just crashed the template. I've tried creating a 'top level' function like: Template.collection = function () {... } but that also crashed the template. What I'm trying to avoid is having two separate functions (one Template.collection.title, and one Template collection.items) where each of them calls a findOne on the Record collection where really its the same template and one call should suffice. Any ideas?
0
[ 2, 17522, 45, 2848, 91, 119, 53, 1923, 20, 21, 22894, 800, 3726, 3726, 31, 259, 20, 1600, 21, 22894, 118, 728, 18, 22621, 835, 20, 14, 53, 18, 1021, 9, 98, 31, 83, 101, 25, 20, 57, 81, 12157, 904, 20, 14, 13, 22, 15015, 872,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Cython support in Vim's taglist? === I was wondering if it is possible to make vim's taglist to show cython source code information. It seems ctag already supports cython, but Tlist does not show any information of opened cython file.
0
[ 2, 6728, 11570, 555, 19, 1790, 79, 22, 18, 3383, 5739, 60, 800, 3726, 3726, 31, 23, 5712, 100, 32, 25, 938, 20, 233, 1790, 79, 22, 18, 3383, 5739, 20, 298, 6728, 11570, 1267, 1797, 676, 9, 32, 2206, 272, 8628, 614, 6747, 6728, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Oracle 11g RAC, package compile not working properly === After putting our database to RAC into two servers, i'm having problem to compile packages, when I compile it's getting compiled to one server and second one remaining without that package. how to fix this?
0
[ 2, 15759, 547, 263, 13, 5797, 15, 6030, 26561, 52, 638, 7428, 800, 3726, 3726, 75, 3873, 318, 6018, 20, 13, 5797, 77, 81, 17595, 15, 31, 22, 79, 452, 1448, 20, 26561, 16875, 15, 76, 31, 26561, 32, 22, 18, 1017, 9316, 20, 53, 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, 0, 0, 0, 0...
Items.push variable using JavaScript === I have an JSON array, that i manipulate inside my app, ... $.each(data, function(key, val) { val = link + val; foto = val; foto = foto.substr(0, foto.lastIndexOf(".")) + ".jpg"; /* Visualizza */ var elem = document.getElementById("archivio-num"); elem.innerHTML = '<a href="#"><img src="'+foto+'"></a>'; elem.firstChild.onclick = function() { cordova.exec( "ChildBrowserCommand.showWebPage", val ); }; items.push('<li id="' + key + '">' + elem.innerHTML + '</li>'); }); ... Now i'm trying to push all elements outside that are packed inside var elem. Puttin only + elem + give me an error [objectHTMLDivElement]. Is that possible?
0
[ 2, 3755, 9, 26973, 7612, 568, 8247, 8741, 800, 3726, 3726, 31, 57, 40, 487, 528, 7718, 15, 30, 31, 18468, 572, 51, 4865, 15, 13, 9, 9, 9, 5579, 9, 14322, 5, 18768, 15, 1990, 5, 4237, 15, 3347, 6, 13, 1, 3347, 800, 3508, 2754...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Pay-per-node on Drupal Ecommerce? === I'm trying to create a pay-per-node product, but I'm finding that it isn't built into Drupal Ecommerce. I don't want to install additional modules, but I've found a dev release of a pay-per-node module. Is there any other way to do this, without installing any but the top 10 most frequently used drupal modules and core?
0
[ 2, 1372, 8, 1432, 8, 251, 546, 27, 15708, 6720, 13, 62, 26470, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 1372, 8, 1432, 8, 251, 546, 2374, 15, 47, 31, 22, 79, 3007, 30, 32, 2532, 22, 38, 392, 77, 15708, 6720, 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...
How to permanently stop audio in iOS with pressing home button? === I've got an application with a navigation tree. Somewhere there is an audio player with an mp3. UITabViewController // controlled by AppDelegate.m -> UINavigationController -> UITableViewController // controlled by TableViewController.m -> UIViewController // with my AVAudioPlayer controlled by AudioViewController.m In `AudioViewController.m` I have all my audio engine so i play/pause/stop it, and even kill it when pressing back button (using viewWillDisappear etc) - it plays only in this one view, not another, and it's good. However there is an issue when i press home button while playback is on. It stops, but after going back to my app, it plays again from remembered time stamp. I tried all this: - (void)viewDidUnload { [super viewDidUnload]; [self audioStop:self]; } - (void)viewWillDisappear:(BOOL)animated { [self audioStop:self]; [super viewWillDisappear:animated]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self audioStop:self]; } - (void)viewWillUnload { [self audioStop:self]; [super viewWillUnload]; } - (void)awakeFromNib { [super awakeFromNib]; [self audioStop:self]; } But nothing happens. Now i know that to manage if home button was pressed, i need to use `applicationWillResignActive` method from AppDelegate, but i have totally no idea how do i stop my audioplayer from here. I'm quite new to iOS and i'm not familiar with how `delegates` work, so please help me work this out.
0
[ 2, 184, 20, 8384, 747, 4023, 19, 13, 7760, 29, 7196, 213, 5167, 60, 800, 3726, 3726, 31, 22, 195, 330, 40, 3010, 29, 21, 8368, 1541, 9, 3493, 80, 25, 40, 4023, 517, 29, 40, 4628, 240, 9, 13, 11193, 2297, 4725, 12898, 1252, 128...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How I can I simulate long database round trip time on an Entity Framework connection? === We are creating N-Tier apps using Azure Web Roles with SQL Azure Database backend with EF as our ORM. When are developing sites we have noticed that they tend to perform signifncalty worse in the real world. This is largely due to EF lazy loading large parts of data. We have used Miniprofiler which gives some good notification but it doesn't really give the feel of what the site would operate like in a live environment. Is there anyway that we can get our local database to take say 100ms to respond to each query thus simulating the round trip time between tiers? This will hopefully give developers an easy feel when developing the system locally that they need to optimise EF queries.
0
[ 2, 184, 31, 92, 31, 24969, 175, 6018, 560, 2305, 85, 27, 40, 9252, 6596, 2760, 60, 800, 3726, 3726, 95, 50, 2936, 13, 103, 8, 5259, 4865, 18, 568, 25715, 2741, 2954, 29, 4444, 255, 25715, 6018, 97, 2451, 29, 11599, 28, 318, 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...
Loop in entity objects and set object's property === I have product object. Product object has DiscountRate and Price properties. I want to change price, depending on the discount rate feature. I want to do this for all my Product objects. Here is my code: public IEnumerable<Product> GetAll() { //I want to set change price in here. return _kContext.Products.ToList(); } Do you have any suggestions?
0
[ 2, 5293, 19, 9252, 3916, 17, 309, 3095, 22, 18, 1354, 800, 3726, 3726, 31, 57, 2374, 3095, 9, 2374, 3095, 63, 14691, 5487, 17, 2162, 3704, 9, 31, 259, 20, 753, 2162, 15, 4758, 27, 14, 14691, 1684, 1580, 9, 31, 259, 20, 107, 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...
How to find the content of selected cell in GridView === I am trying to get the selected cells and their contents in GridView while copying. While copying a cell's content I get cell item source instead of cell content. Event for copying the grid private void RadGrid_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e) { var textBlock = e.Cell as TextBlock; if (textBlock != null) { e.Value = textBlock.Text; } } I always get textblock as null. How can I get the cell content while copying.
0
[ 2, 184, 20, 477, 14, 2331, 16, 1704, 1667, 19, 7354, 4725, 800, 3726, 3726, 31, 589, 749, 20, 164, 14, 1704, 2934, 17, 66, 8478, 19, 7354, 4725, 133, 4344, 68, 9, 133, 4344, 68, 21, 1667, 22, 18, 2331, 31, 164, 1667, 9101, 126...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Save and restore state of a mysql database === I'm working on a website that has a lot of unit tests, each needing the database to be in some 'default' state. Right know I'm destroying the database with each test and loading the default state using an SQL script. And it's very slow. So I thought that it would be useful if I could save that default state and restore the database to it at the beginning of each test. Is this possible ? If not, why could I do to accelerate the process ? Right know I drop the entire database and re-create it. If I dropped only the rows wouldn't that improve the performance ?
0
[ 2, 2079, 17, 8454, 146, 16, 21, 51, 18, 22402, 6018, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 2271, 30, 63, 21, 865, 16, 1237, 4894, 15, 206, 12210, 14, 6018, 20, 44, 19, 109, 13, 22, 13862, 9708, 22, 146, 9, 193, 143, 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...
Adding a new Couchbase bucket caused BucketNotFound error === I'm using Couchbase 1.8.0 on Mac OS X along with the Ruby libraries to access it. I deleted the default bucket and created by own bucket called 'mybucket', with the password 'password'. I'm accessing the bucket with the following Ruby code: url = "http://127.0.0.1:8091/pools/default" Couchbase.new(url, :bucket_name => 'mybucket', :bucket_password => 'password') and I'm getting the following error: Couchbase::Error::BucketNotFound (HTTP/1.1 404 Object Not Found Server: Couchbase Server 1.8.0r_74_g85f643d-community Does any one have any thoughts? I've tried rebooting both the server and the rails app (even though I shouldn't have to) and it's still not connecting. I'm not really sure what I'm doing wrong. Thanks!
0
[ 2, 4721, 21, 78, 4914, 8436, 12433, 1497, 12433, 1270, 12235, 7019, 800, 3726, 3726, 31, 22, 79, 568, 4914, 8436, 137, 9, 457, 9, 387, 27, 1572, 13, 759, 993, 303, 29, 14, 10811, 8649, 20, 1381, 32, 9, 31, 19584, 14, 12838, 1243...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Replace column references in values === I have a table which has two columns (id and word). I have an other table which has a data column and its value references the word in the first table. Here is a sample code: CREATE TABLE `words` ( `id` TINYINT, `word` VARCHAR(50), PRIMARY KEY (`id`) ); INSERT INTO `words` VALUES (1, 'one'), (2, 'two'), (3, 'three'); CREATE TABLE `data` ( `data` TEXT ); INSERT INTO `data` VALUES ('word=one'), ('word=three'); I would like to replace the references of words to ids. So `word=one` would become `word=1`, `word=three` would become `word=3` and so on. I tried this query, but it doesn't work: UPDATE `data`, `words` SET `data`.`data` = REPLACE(`data`.`data`, CONCAT('word=', `words`.`word`), CONCAT('word=', `words`.`id`)); Any suggestion or idea how to achieve what I want? Thanks!
0
[ 2, 3934, 4698, 7231, 19, 4070, 800, 3726, 3726, 31, 57, 21, 859, 56, 63, 81, 7498, 13, 5, 1340, 17, 833, 6, 9, 31, 57, 40, 89, 859, 56, 63, 21, 1054, 4698, 17, 82, 1923, 7231, 14, 833, 19, 14, 64, 859, 9, 235, 25, 21, 57...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 instance of a class in ArrayList Java === I have a small problem with ArrayList. You see, I wish to get an instance of RenderNewHUD in my renderer class, which has a list of registered renderers. I did not want to create a variable for this due to limitations and awkwardness. Here is my code. RenderNewHUD hud = renderer.renderList.get(RenderNewHUD()); How exactly can I go along getting the instance of RenderNewHUD without creating a new instance? If you need any more of my code, just ask. Sorry if this is a very dumb question - I have looked EVERYWHERE for an answer.
1
[ 2, 1017, 4851, 16, 21, 718, 19, 7718, 5739, 8247, 800, 3726, 3726, 31, 57, 21, 284, 1448, 29, 7718, 5739, 9, 42, 196, 15, 31, 2536, 20, 164, 40, 4851, 16, 16535, 2681, 2242, 43, 19, 51, 16535, 106, 718, 15, 56, 63, 21, 968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 As Principal Class For Mac App === So, I've got a c file raring to go and be the main class behind an all-C mac-app, however, a combination of limiting factors are preventing the application from being launched. As it currently stands, the project is just a main.m and a class called AppDelegate.c, so I entered "AppDelegate" as the name of the principal class in the info.plist, and to my complete surprise, the log printed: > Unable to find class: AppDelegate, exiting This would work perfectly well in iOS, because the main function accepts the name of a delegate class, and handles it automatically, but NSApplicationMain() takes no such argument. Now, I know this stems from the fact that there are no `@interface/@implementation` directives in C, and that's really what the OS seems to be looking for, so I wrote a simple `NSApplication` subclass and provided it as the Principal Class to the plist, and it launched perfectly well. My question is, how could one go about setting a c file as the principal class in a mac application and have it launch correctly? PS, don't ask what or why I'm doing this for, the [foundation must be dug](http://stackoverflow.com/questions/10289890/how-to-write-ios-app-purely-in-c#comment13239523_10289913).
0
[ 2, 272, 28, 2279, 718, 26, 1572, 4865, 800, 3726, 3726, 86, 15, 31, 22, 195, 330, 21, 272, 3893, 13, 525, 2090, 20, 162, 17, 44, 14, 407, 718, 439, 40, 65, 8, 150, 1572, 8, 7753, 15, 207, 15, 21, 3733, 16, 17567, 4776, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Overriding map in a class that extends Array in ActionScript === Say just for fun I want to override `Array` and redefine `map`: public dynamic class MagicArray extends Array { public override function map(f:Function, thisObject:* = null):Array { var result:Array = []; for (var i:int = 0; i < this.length; i++) { result.push(f(this[i])); } return result; } } We get this error: `Method marked override must override another method.` Huh? So I stripped the `override` keyword and tried again. Now, everything compiles fine. But if we try to use it: var a:MagicArray = new MagicArray([1,2,3]); a.map(function(x) { return x + 1; }); We get the following error: `Error: Ambiguous reference to map.` So what's going on here? How can I override `map`?
0
[ 2, 84, 5175, 68, 2942, 19, 21, 718, 30, 9073, 7718, 19, 1028, 8741, 800, 3726, 3726, 395, 114, 26, 2414, 31, 259, 20, 84, 11891, 13, 1, 8576, 93, 1, 17, 402, 62, 7509, 13, 1, 15022, 1, 45, 317, 7782, 718, 2154, 8576, 93, 907...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Changing PHP variable from an <a href=""> link === Quite new to coding, so I may well be attacking this from the wrong angle. I beg of you to please tell me if I'm making life hard for myself. I'm making a site using divs. I have one across the top with a row of links which I want to change what's in the main window. I would prefer to keep strictly to PHP and HTML and use a full page refresh as I am comfortable with them at current, rather than using an Ajax refresh as I don't have any knowledge of Ajax. I don't want to use iframes. I thought the best way to do this would be as follows: <div id="top"> <a href="news.html">News</a> </div> <div id="main"> <?php include($page); ?> </div> What I need is a way of changing the $page variable upon the clicking of the link. If this means changing the variable and then reloading the page then so be it. A command following the logic of: <a href="news.html" action="<?php $page="news.html"; ?>">News</a> would be ideal! I thought about using a form, but it seems there should be an easier way. Thanks!
0
[ 2, 4226, 13, 26120, 7612, 37, 40, 13, 1, 58, 746, 14057, 3726, 7, 7, 1, 3508, 800, 3726, 3726, 1450, 78, 20, 13, 15458, 15, 86, 31, 123, 134, 44, 7524, 48, 37, 14, 1389, 5334, 9, 31, 9985, 16, 42, 20, 2247, 494, 55, 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, 1...
query does not work with mysqli php class but works in mysql workbench === I am using the mysqli db class found at [github][1] my query looks like $db->query('SELECT memberID,zoneCode,state,zone,countyName,CONCAT(state,\'Z\',zone) as fullZoneCode FROM members_zonesToWatch LEFT JOIN ( SELECT state,zone,countyName FROM countyPublicForcastZoneCorrelation ) as zones ON zoneCode = CONCAT(state,\'Z\',zone)'); The issue im getting is Fatal error: Problem preparing query (SELECT memberID,zoneCode,state,zone,countyName,CONCAT(state,'Z',zone) as fullZoneCode FROM members_zonesToWatch LEFT JOIN ( SELECT state,zone,countyName FROM countyPublicForcastZoneCorrelation ) as zones ON zoneCode = CONCAT(state,'Z',zone)) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Z',zone) as fullZoneCode FROM members_zonesToWatch LEFT' at line 1 This query as it is works in mysql workbench just fine. What is wrong with it using the mysqli class? [1]: https://github.com/ajillion/PHP-MySQLi-Database-Class/blob/master/MysqliDb.php
0
[ 2, 25597, 630, 52, 170, 29, 51, 18, 1251, 1210, 13, 26120, 718, 47, 693, 19, 51, 18, 22402, 170, 26359, 800, 3726, 3726, 31, 589, 568, 14, 51, 18, 1251, 1210, 13, 9007, 718, 216, 35, 636, 10404, 20926, 500, 2558, 165, 500, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS (xcode) crashed after typing in texts in UITextField and go back (NSISObjectiveLinearExpression coefficientForVariable) === My iOS (xcode) crashed when I typed in texts in the UITextFields in a login page view controller (a child of navigationViewController), the authentication failed, I went back to the RootViewController and click on another child of the navigationViewController (sign up page view controller) and it crashes. It works fine to go to two child view controllers if I didn't type anything. Just wondering if anyone knows why? Thanks, Below is the error message. [NSISObjectiveLinearExpression coefficientForVariable:]: unrecognized selector sent to instance 0x1cd93850
0
[ 2, 13, 7760, 13, 5, 396, 9375, 6, 7579, 75, 25266, 19, 6381, 19, 13, 5661, 11969, 1109, 17, 162, 97, 13, 5, 103, 4557, 23793, 1284, 19333, 28993, 14612, 1106, 8220, 579, 6, 800, 3726, 3726, 51, 13, 7760, 13, 5, 396, 9375, 6, 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 there an existing XSLT extension that allows inspecting/unzipping files? === Before I write my own java extension, I'm looking for a xslt feature or xslt extension to allow inspecting content of a zip file, and unzip the content. I tried looking in the xslt 2.0 spec, did not mention any unzipping. I tried googling, and got an experimental expath.org/mod/zip, but compiler says cannot find the matching function "entries()". Thanks, Jason
0
[ 2, 25, 80, 40, 3149, 993, 18, 255, 38, 3896, 30, 2965, 19, 7350, 68, 118, 1020, 2553, 5574, 6488, 60, 800, 3726, 3726, 115, 31, 2757, 51, 258, 8247, 3896, 15, 31, 22, 79, 699, 26, 21, 993, 18, 255, 38, 1580, 54, 993, 18, 255...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 form submit button is not showing correctly === I have created an form that submits the contents to email. I have used the exact same coding in many other websites, but for my new website [http://www.peterevansfuneraldirectors.co.uk/contact-us.html][1] the submit button is just a grey square with text, rather than the usual button. Also the hand doesn't come up on hover. My form code is... <form action="php/FormToEmail.php" method="post" name="ContactForm" id="ContactForm" onsubmit="MM_validateForm('name','','R','email','','RisEmail','message subject','','R','message','','R');return document.MM_returnValue" > <div class="form-text"> <b>Name<span class="purple">*</span></b><br /> <input name="name" type="text" id="name" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Email<span class="purple">*</span></b><br /> <input name="email" type="text" id="email" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Message Subject<span class="purple">*</span></b><br /> <input name="message subject" type="text" id="message subject" size="35" style="height:23px; background-color:#FFF; color:#000; border: 1px solid #CCC;" /> </div><br /> <div class="form-text"> <b>Message<span class="purple">*</span></b><br /> <textarea name="message" type="text" id="message" rows="8" cols="55" style="background-color:#FFF; color:#000; border: 1px solid #CCC;" ></textarea> </div><br /> <div class="submit-button"> <input type="submit" name="submit" value="Submit" /> </div> </form> Thanks in advance! Jack. [1]: http://www.peterevansfuneraldirectors.co.uk/contact-us.html
0
[ 2, 51, 505, 12298, 5167, 25, 52, 3187, 12044, 800, 3726, 3726, 31, 57, 679, 40, 505, 30, 12298, 18, 14, 8478, 20, 8517, 9, 31, 57, 147, 14, 5340, 205, 13, 15458, 19, 151, 89, 13931, 15, 47, 26, 51, 78, 2271, 636, 21127, 6903, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
UTF8 to equivalent number in php === I've been searching my !!! off trying to find a PHP function to convert UTF8 to the equivalent number. I'm not entirely sure what to call the number (I heard its called an ordinate?) but heres an example: http://jrgraphix.net/r/Unicode/3040-309F Basically I'm trying to read a UTF-8 .txt file in PHP and then save every line in an array, so I can mess around with it. If anyone can assist me with this it would be highly appreciated, as I am not that familiar with UTF8 yet.
0
[ 2, 287, 11720, 457, 20, 4602, 234, 19, 13, 26120, 800, 3726, 3726, 31, 22, 195, 74, 5792, 51, 13, 28116, 168, 749, 20, 477, 21, 13, 26120, 1990, 20, 8406, 287, 11720, 457, 20, 14, 4602, 234, 9, 31, 22, 79, 52, 2894, 562, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Eclipse wont recognize Android support library revision 9 === I recently downloaded all the latest updates for my eclipse/Android plugins (before the upgrades everything worked fine). I got everything to work except when i try to create a new project I get a message that I need `Android support library revision 8`. I click Install/Upgrade and It proceeds to download and install the library. When it finishes the tiny download/install window disappears but the window which informs me that i need `Android support library revision 8` remains open and i cant click finish to create new project. I tried closing the window and eclipse and trying it again but it always leads me to the window which states I need the `Android support library revision 8`. I didnt move eclipse to any other location and I am wondering what is wrong. I had a problem before with an `!` in my eclipse path and eclipse wouldnt work because of exit error 13. I posted a [question][1] about it before. My answer explains what has happened and the easy fix. I am wondering what is wrong now. Do i need to manually link the support library? Im really frustrated because its taking me forever to set this up. [1]: http://stackoverflow.com/questions/6166795/eclipse-crushes-at-startup-exit-code-13
0
[ 2, 11652, 7290, 5844, 13005, 555, 1248, 11323, 561, 800, 3726, 3726, 31, 1989, 23887, 65, 14, 5736, 16779, 26, 51, 11652, 118, 290, 18524, 10922, 108, 18, 13, 5, 12750, 14, 9483, 18, 796, 577, 1123, 6, 9, 31, 330, 796, 20, 170, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 411 using resumable upload in weblogic === I have an aplicattion deployed in weblogic and when I try to upload a file using the resumable upload mechanism the web server throws a 411 exception: > Caused by: com.google.gdata.util.ServiceException: Length Required > <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta > name=viewport content="initial-scale=1, minimum-scale=1, > width=device-width"> <title>Error 411 (Length Required)!!1</title> > <style> > *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% > auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px > no-repeat;padding-right:205px}p{margin:11px 0 > 22px;overflow:hidden}ins{color:#777;text-decoration:none}a > img{border:0}@media screen and > (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}} > </style> <a href=//www.google.com/><img > src=//www.google.com/images/errors/logo_sm.gif alt=Google></a> > <p><b>411.</b> <ins>That’s an error.</ins> <p>POST requests require > a <code>Content-length</code> header. <ins>That’s all we know.</ins> > > at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:632) > at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564) > at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560) > at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538) > at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:539) > at com.google.gdata.client.media.MediaService.createResumableUploadSession(MediaService.java:631) > at com.google.gdata.client.media.ResumableGDataFileUploader$Builder.build(ResumableGDataFileUploader.java:250) > at com.google.gdata.client.media.ResumableGDataFileUploader$Builder$build.call(Unknown Source) > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) > at myaplicattion.GoogleServiceTest.uploadFile(GoogleServiceTest.groovy:1043) > at myaplicattion.GoogleServiceTest$$FastClassByCGLIB$$b6cb0237.invoke(<generated>) > at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) > at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) > at myaplicattion.GoogleServiceTest$$EnhancerByCGLIB$$bfff71ed.uploadFile(<generated>) > at myaplicattion.GoogleServiceTest$uploadFile.call(Unknown Source) > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) > at myaplicattion.StoreService.uploadFileToFolder(StoreService.groovy:643) > at myaplicattion.StoreService$$FastClassByCGLIB$$eb3346d.invoke(<generated>) > at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) > at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) > ... 71 more It works in Tomcat and it's not working in Weblogic, any idea? > ResumableGDataFileUploader uploader = new > ResumableGDataFileUploader.Builder( > service, url, mediaFile, null) > .title(mediaFile.getName()).chunkSize(MAX_SIZE) > .executor(executor).trackProgress(listener, TIME_INTERVAL).build();
0
[ 2, 7019, 13, 25000, 568, 10719, 723, 579, 71, 8294, 19, 2741, 24268, 800, 3726, 3726, 31, 57, 40, 21, 25971, 38, 3309, 6698, 19, 2741, 24268, 17, 76, 31, 1131, 20, 71, 8294, 21, 3893, 568, 14, 10719, 723, 579, 71, 8294, 6534, 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...
database design - Foreign Keys? === I would like to be able to reference one table from a field in another. For instance, if I have a table with columns 1, 2 & 3 and rows A, B & C, the field at 1A would reference a table named 1_A, possibly. Table 1_A would only need to contain a single column with each row containing a name, and possibly an ID, but I really only need a list. When I query the database I would need to be able to get/compare the referenced tables/lists in a given column, 1_A, 1_B & 1_C. Am I approaching this correctly? Is there a better way to store/reference lists in a database. The main table would not change, only the referenced tables would be updated. I'm new to databases, thanks for your help.
0
[ 2, 6018, 704, 13, 8, 1228, 5534, 60, 800, 3726, 3726, 31, 83, 101, 20, 44, 777, 20, 2801, 53, 859, 37, 21, 575, 19, 226, 9, 26, 4851, 15, 100, 31, 57, 21, 859, 29, 7498, 137, 15, 172, 279, 203, 17, 11295, 21, 15, 334, 279,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Time (from xx:xx - to xx:xx ) in PHP === I am trying to have to dropdown lists which would contain 12-hour clocks. Those two represent the from list, and the to list. The user basically uses those to specify their availability time. I am trying to figure out how to validate that the time span is valid. Any ideas with this? I am willing to change the whole concept if you have any ideas. Thanks!
0
[ 2, 85, 13, 5, 2665, 13, 8962, 45, 8962, 13, 8, 20, 13, 8962, 45, 8962, 13, 6, 19, 13, 26120, 800, 3726, 3726, 31, 589, 749, 20, 57, 20, 2804, 2968, 7227, 56, 83, 3717, 390, 8, 4754, 4229, 18, 9, 273, 81, 3501, 14, 37, 968,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 jQuery function possible with prototype? === I'm working with Magento, and I'm fed up with its built-in prototype #%@$!! I have the "[Pre-Select Colors Plus Swatches][1]" extension, and I'm also pissed with that, because it didn't do its job on pre-selecting products color atribute when the page loads. I'v also spent a few hours trying to get jQuery noConflict() to work, but it crashes exactly the extension aforementioned. So I ended up with that jQuery code working, and need to translate it to Prototype, what seems impossible! This function simulates a click on the first available color option, and I call it after the page loads. Is it possible with prototype? How ??? $j("div.atributoProduto.Cor img.swatch:not('.disabledSwatch'):first").parent().click(); Also, if you can come up with a miracle code to make jQuery and prototype coexist, it would be nice. But I'v done some research and tried many ways to do it... [1]: http://www.magentocommerce.com/magento-connect/pre-select-colors-plus-swatches.html
0
[ 2, 25, 48, 487, 8190, 93, 1990, 938, 29, 7063, 60, 800, 3726, 3726, 31, 22, 79, 638, 29, 4723, 17050, 15, 17, 31, 22, 79, 6068, 71, 29, 82, 392, 8, 108, 7063, 6926, 11881, 1, 4403, 19015, 31, 57, 14, 13, 7, 2558, 3515, 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...
Data out of sync between a custom CursorLoader and a CursorAdapter backing a ListView === ##Background: I have a custom `CursorLoader` that works directly with SQLite Database instead of using a `ContentProvider`. This loader works with a `ListFragment` backed by a `CursorAdapter`. So far so good. To simplify things, lets assume there is a Delete button on the UI. When user clicks this, I delete a row from the DB, and also call `onContentChanged()` on my loader. Also, on `onLoadFinished()` callback, I call `notifyDatasetChanged()` on my adapter so as to refresh the UI. ##Problem: When the delete commands happen in rapid succession, meaning the `onContentChanged()` is called in rapid succession, **`bindView()` ends up to be working with stale data**. What this means is a row has been deleted, but the ListView is still attempting to display that row. This leads to Cursor exceptions. What am I doing wrong? ##Code: This is a custom CursorLoader (based on [this advice][1] by Ms. Diane Hackborn) /** * An implementation of CursorLoader that works directly with SQLite database * cursors, and does not require a ContentProvider. * */ public class VideoSqliteCursorLoader extends CursorLoader { /* * This field is private in the parent class. Hence, redefining it here. */ ForceLoadContentObserver mObserver; public VideoSqliteCursorLoader(Context context) { super(context); mObserver = new ForceLoadContentObserver(); } public VideoSqliteCursorLoader(Context context, Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { super(context, uri, projection, selection, selectionArgs, sortOrder); mObserver = new ForceLoadContentObserver(); } /* * Main logic to load data in the background. Parent class uses a * ContentProvider to do this. We use DbManager instead. * * (non-Javadoc) * * @see android.support.v4.content.CursorLoader#loadInBackground() */ @Override public Cursor loadInBackground() { Cursor cursor = AppGlobals.INSTANCE.getDbManager().getAllCameras(); if (cursor != null) { // Ensure the cursor window is filled int count = cursor.getCount(); registerObserver(cursor, mObserver); } return cursor; } /* * This mirrors the registerContentObserver method from the parent class. We * cannot use that method directly since it is not visible here. * * Hence we just copy over the implementation from the parent class and * rename the method. */ void registerObserver(Cursor cursor, ContentObserver observer) { cursor.registerContentObserver(mObserver); } } A snippet from my `ListFragment` class that shows the `LoaderManager` callbacks; as well as a `refresh()` method that I call whenever user adds/deletes a record. @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mListView = getListView(); /* * Initialize the Loader */ mLoader = getLoaderManager().initLoader(LOADER_ID, null, this); } @Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { return new VideoSqliteCursorLoader(getActivity()); } @Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { mAdapter.swapCursor(data); mAdapter.notifyDataSetChanged(); } @Override public void onLoaderReset(Loader<Cursor> loader) { mAdapter.swapCursor(null); } public void refresh() { mLoader.onContentChanged(); } My `CursorAdapter` is just a regular one with `newView()` being over-ridden to return newly inflated row layout XML and `bindView()` using the `Cursor` to bind columns to `View`s in the row layout. [1]: https://groups.google.com/d/msg/android-developers/J-Uql3Mn73Y/3haYPQ-pR7sJ
0
[ 2, 1054, 70, 16, 6063, 150, 128, 21, 5816, 29588, 8294, 106, 17, 21, 29588, 27576, 106, 3931, 21, 968, 4725, 800, 3726, 3726, 6926, 5910, 1958, 8810, 45, 31, 57, 21, 5816, 13, 1, 4734, 18, 248, 8294, 106, 1, 30, 693, 1703, 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...
Client doesnt load assets after adding last-modified header === Im running my rails app in production mode using thin and nginx (0.7.6) on Debian. Its working pretty well but not I tried to implement the last-modified header and when I restart nginx the client doesnt load the assets anymore. This is my nginx config: upstream instance-name { server unix:/var/run/thin/appname.0.sock; server unix:/var/run/thin/appname.1.sock; server unix:/var/run/thin/appname.2.sock; server unix:/var/run/thin/appname.3.sock; } server { listen 5678; server_name appname; access_log /root/rails/appname/log/access.log; error_log /root/rails/appname/log/error.log; root /root/rails/appname/public; index index.html; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://fibre-dox; break; } } location ~* \.(jpg|gif|png|css|js)$ { if (-f $request_filename) { expires max; break; } } } The part that causes me trouble is this one: location ~* \.(jpg|gif|png|css|js)$ { if (-f $request_filename) { expires max; break; } } What am I doing wrong? I want to use the last-modified header so the client doesnt reload all the pics everytime it hits the page.
0
[ 2, 6819, 5886, 6305, 6223, 75, 4721, 236, 8, 13670, 4462, 157, 106, 800, 3726, 3726, 797, 946, 51, 2240, 18, 4865, 19, 637, 3740, 568, 2951, 17, 13, 2723, 108, 396, 13, 5, 387, 9, 465, 9, 379, 6, 27, 121, 10035, 9, 82, 638, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
somthing Wrong in json coding in android === >strong textI am a new android user i want to get data from my drupal site to android. I am writing this code which is not working. This is a main activity name **MainActivity:** package com.example.nothing; import org.json.JSONArray; import org.json.JSONException; import android.os.Bundle; import android.util.Log; import android.app.Activity; public class MainActivity extends Activity { // url to make request private static String url = "http://10.0.2.2/drupal6/android/user/"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Hashmap for ListView // Creating JSON Parser instance JSONParser jParser = new JSONParser(); Log.d("check", "Log no 1"); try { Log.d("check", "Log no 2"); JSONArray json = jParser.getJSONFromUrl(url); Log.d("check", "Log no 3"); System.out.println("JA " + json.toString()); Log.d("check", "Log no 4"); for (int i = 0; i < json.length(); i++) { System.out.println((i + 1) + "Uid = " + json.getJSONObject(i).getString("uid")); System.out.println((i + 1) + "Name = " + json.getJSONObject(i).getString("name")); } Log.d("check", "Log no 5"); } catch (JSONException e) { e.printStackTrace(); }}} Jsonparser file name **JSONParser:** package com.example.nothing; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; public class JSONParser { static InputStream is = null; static JSONArray jary = null; static String json = ""; // constructor public JSONParser() { } public JSONArray getJSONFromUrl(String url) { Log.d("url", url); // Making HTTP request try { Log.d("check", "Log no p 1"); // defaultHttpClient DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); is = httpEntity.getContent(); Log.d("check", "Log no p 2"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } try { Log.d("check", "Log no p 3"); BufferedReader reader = new BufferedReader( new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); Log.d("check", "Log no p 4"); } is.close(); json = sb.toString(); } catch (Exception e) { Log.e("Buffer Error", "Error converting result " + e.toString()); } // try parse the string to a JSON object try { Log.d("check", "Log no p 5"); jary = new JSONArray(json); Log.d("check", "Log no p 6"); } catch (JSONException e) { Log.e("JSON Parser", "Error parsing data " + e.toString()); } // return JSON String return jary; } }
0
[ 2, 86, 79, 96, 68, 1389, 19, 487, 528, 13, 15458, 19, 13005, 800, 3726, 3726, 13, 1, 15004, 1854, 49, 589, 21, 78, 13005, 4155, 31, 259, 20, 164, 1054, 37, 51, 15708, 6720, 689, 20, 13005, 9, 31, 589, 1174, 48, 1797, 56, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how detect device is chatting with another Android device? === I saw [Chatting in Android][1] and other closed questions in about `Chatting` ,before, but I could not solve my problem. In my App,I would to detect when device is chatting with another`Android device` and then detect it's contact.I guess that I would to start a service,or register a BroadcastReceiver that observe `chatting` and detect that it is chatting with another android device.But I don't know what broadcast must be received that leads me device is chatting,also if I detect chatting,how I can detect that another device is Android device?You know that Google talk detect that another device is Android device. [1]: http://stackoverflow.com/questions/5360208/chatting-in-android
0
[ 2, 184, 9092, 3646, 25, 25169, 29, 226, 13005, 3646, 60, 800, 3726, 3726, 31, 441, 636, 13409, 1203, 19, 13005, 500, 2558, 165, 500, 17, 89, 827, 2346, 19, 88, 13, 1, 13409, 1203, 1, 13, 15, 12750, 15, 47, 31, 110, 52, 8402, 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...
LINQ expression result implicit to inherited object === I've an **Document** object and **User** object, generated by Entity Framework Model Generator. I want to get **Document** list, plus *userCount* created according to this Document. So, I've created new object *DocumentWithUserCount*: public class DocumentWithUserCount:Document { public uAmount {get;set} } And LINQ to retain data: var ed = (from d in _entity.Document join p in _entity.User[get DocID and count by this docID ] on d.RID equals p.DocID select new enSpecificDocument(xxxx)).ToList(); How to do this?
0
[ 2, 6294, 1251, 1803, 829, 20290, 20, 7179, 3095, 800, 3726, 3726, 31, 22, 195, 40, 13, 1409, 28132, 1409, 3095, 17, 13, 1409, 16704, 1409, 3095, 15, 6756, 34, 9252, 6596, 1061, 15286, 9, 31, 259, 20, 164, 13, 1409, 28132, 1409, 96...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 add list of SonataUserBundle Users to admin dashboard (SonataAdminBundle)? === ## How to add Users to admin dashboard? #### My app: - Symfony 2.0.16 - FOSUserBundle 1.2.x - SonataAdminBundle - SonataMediaBundle - SonataPageBundle - SonataUserBundle I've followed the instructions in sonata-project.org and I get no errors, but my admin dashboard is empty! I would like to manage my Users and Groups. I don't know if thats relevant but Sonata is added in kernel as: > new SonataUserBundle('FOSUserBundle') How to add CRUD for User's and Groups to my admin dashboard? ### PS. If you want to see my config, just tell me which part. I did not post all my configs, becouse there are alot of lines of code and I wanted to keep this question clean.
0
[ 2, 184, 20, 3547, 968, 16, 13959, 16704, 9930, 413, 3878, 20, 21, 43, 2160, 26478, 13, 5, 528, 4375, 1283, 2160, 9930, 413, 6, 60, 800, 3726, 3726, 6926, 5910, 184, 20, 3547, 3878, 20, 21, 43, 2160, 26478, 60, 6926, 5910, 5910, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Post a comment on a Youtube video externally? === I am trying to look for a way to post a comment on a youtube video from my (in-construction) website. I am able to get the comments that the users have posted on the video through the use of XML, but was wondering how to enable users from my website to comment on the embedded video that they are watching without having to go to the Youtube website? I am currently using PHP to do all the processing within my website of getting the embedded video's url, recommended videos, and user comments, but am open to try other languages.
0
[ 2, 678, 21, 6484, 27, 21, 7330, 763, 4886, 102, 60, 800, 3726, 3726, 31, 589, 749, 20, 361, 26, 21, 161, 20, 678, 21, 6484, 27, 21, 7330, 763, 37, 51, 13, 5, 108, 8, 27900, 6, 2271, 9, 31, 589, 777, 20, 164, 14, 7534, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Qt : Transfer an event to a child widget without infinite recursion === I would like to transfer an event to a child of one widget. My current implementation is (where `_table` is a `QTableWidget*` data member of `MyWidget`) void MyWidget::mousePressEvent(QMouseEvent *event) { QHeaderView *headerview = _table->horizontalHeader(); QPoint headerpoint = headerview->mapFromGlobal(event->globalPos()); const int index = headerview->logicalIndexAt(headerpoint); if ((index >= 0) && (index < headerview->count())) { QApplication::postEvent(headerview, new QMouseEvent(QEvent::MouseButtonPress, headerpoint, event->button(), event->buttons(), Qt::NoModifier)); } QWidget::mousePressEvent(event); } The problem is that this implementation seems to produce an infinite loop or recursion. What would be a correct implementation ? Thank you very much.
0
[ 2, 2593, 38, 13, 45, 2617, 40, 807, 20, 21, 850, 4807, 43, 3060, 366, 9698, 26604, 5991, 800, 3726, 3726, 31, 83, 101, 20, 2617, 40, 807, 20, 21, 850, 16, 53, 4807, 43, 3060, 9, 51, 866, 6123, 25, 13, 5, 2798, 13, 1, 5924, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
While debugging, how to avoid stepping into code located in different file in asp classic and VBScript? === When debugging **asp.net** code in visual studio, the flow doesn't go to dependancy files unless you put a break point in the code being called. This is the first time I debug **asp/VBScript** code. It looks to me like I've to go through all the depencies <!--#include virtual="path"--> It's kind of annoying and makes me lose focus of the big picture. Is there anyway I can skip those files and keep the flow only on the current asp page? Thanks for helping
0
[ 2, 133, 121, 16254, 2762, 15, 184, 20, 2658, 9451, 77, 1797, 335, 19, 421, 3893, 19, 28, 306, 2732, 17, 13, 20468, 8741, 60, 800, 3726, 3726, 76, 121, 16254, 2762, 13, 1409, 472, 306, 9, 2328, 1409, 1797, 19, 3458, 1120, 15, 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...
Overriding the accent color in my wp 7 app === I am writing an app for Windows Phone 7 and I would like to use my own colors in the app based on the light theme. I started to define brushes in a resource file and applying these to the controls in my app, but these seems to me too cumbersome. Is there a better way to do this? Is there a way to redefine the accent color and the background color, so all controls will use it regardless what the color scheme on the actual phone where my app is running?
0
[ 2, 84, 5175, 68, 14, 7980, 1665, 19, 51, 13, 13790, 453, 4865, 800, 3726, 3726, 31, 589, 1174, 40, 4865, 26, 1936, 1132, 453, 17, 31, 83, 101, 20, 275, 51, 258, 5268, 19, 14, 4865, 432, 27, 14, 471, 3184, 9, 31, 373, 20, 926...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Saving and restoring state of elements in dialog based MFC application === I am writing simple C++ dialog based MFC application. It has several inputs, checkboxes, time selects. As a part of it's functionality it should have Save and Load buttons which would save/restore state of those elements. For example text in input, if some elements are disabled or not, their values. The question is - what is the right approach to do it? The most simple and direct one would be to save values in a specific order (say `text1,text2,checkbox1_state,time_select1`) and then in the same order restore them one by one. Are there other options? I don't want to use some other libraries (saw Boost is mentioned frequently in terms of serialization).
0
[ 2, 7599, 17, 19144, 146, 16, 2065, 19, 28223, 432, 307, 7061, 3010, 800, 3726, 3726, 31, 589, 1174, 1935, 272, 20512, 28223, 432, 307, 7061, 3010, 9, 32, 63, 238, 6367, 18, 15, 2631, 5309, 160, 15, 85, 5407, 18, 9, 28, 21, 141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Lazy-add DataMapper results in a loop === When I want to do OR-queries with DataMapper I use result = MyModel.all(:first_name.like => '%john%') + MyModel.all(:last_name.like => '%john%') This works fine and generates only one SQL query. How can I create the same result with properties given in an array? result = [ :first_name, :last_name ].reduce([]) do |sum, prop| sum + MyModel.all(prop.like => '%john%') end Although this works, it uses two separate SQL queries which is not what I want. Is there a way to create such a "lazy" query in a loop?
0
[ 2, 16792, 8, 14854, 1054, 540, 8763, 1736, 19, 21, 5293, 800, 3726, 3726, 76, 31, 259, 20, 107, 54, 8, 2005, 2829, 29, 1054, 540, 8763, 31, 275, 829, 800, 51, 13998, 9, 1233, 5, 45, 3552, 1, 7259, 9, 1403, 800, 1, 13, 22, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 an variable to curl_init in php === In the below code which is to download an file , But i tried to pass an image url in the form of variable to the curl_init , How to use variable in curl_init // $downlaod="http://image.com/image.jpg"; I used $download variable in the curl_init but it shows errors. <?php $ch = curl_init('http://my.image.url/photo.jpg'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // buffer output (`true` if you will be redirecting stream to the user, in $result will be your image content) curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); // because image is binary data $result = curl_exec($ch); // executing requrest (here will be raw image data if RETURNTRANSFER == true) $response_code = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); // getting response code to ensure that request was successfull $content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); // getting return content-type // Listing allowed image types $allowed_mimes = array( 'image/jpeg', 'image/gif', 'image/png' ); if ($response_code == 200 AND in_array($content_type, $allowed_mimes) ) { header( 'Content-Type: '.$content_type ); echo $result; // echoing image to STDOUT } else return false; ?>
0
[ 2, 184, 20, 1477, 40, 7612, 20, 14320, 1, 108, 242, 19, 13, 26120, 800, 3726, 3726, 19, 14, 1021, 1797, 56, 25, 20, 7121, 40, 3893, 13, 15, 47, 31, 794, 20, 1477, 40, 1961, 287, 6362, 19, 14, 505, 16, 7612, 20, 14, 14320, 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...
DestroySession function preventing logging out of facebook === I'm trying to rework the logout system of my Zend site to also log users out of facebook, in compliance with the facebook app policy, but I'm not having any luck. Here's the code in my logout action to check if the user is logged into facebook and log them out if so. require_once(BASE_PATH . "/library/facebook-php/src/facebook.php"); $facebook = new Facebook( array('appId'=>'app id', 'secret'=>'secret') ); $fbid = $facebook->getUser(); if($fbid){ $facebook->destroySession(); $this->_redirect( $facebook->getLogoutUrl(array('next'=>'http://completeset.us/organizer/index') ) ); } With the destroySession in there, I am logged out of my site, but not out of facebook for some reason. If I take it out, I am logged out of both sites, but since the session is still there I am immediately logged back into my site because it detects that session and is able to match it to my account. How can I both log the user out of facebook and destroy the session?
0
[ 2, 4407, 7202, 5991, 1990, 11520, 13, 13919, 70, 16, 9090, 800, 3726, 3726, 31, 22, 79, 749, 20, 302, 3783, 14, 6738, 1320, 329, 16, 51, 10526, 43, 689, 20, 67, 6738, 3878, 70, 16, 9090, 15, 19, 14969, 29, 14, 9090, 4865, 1486, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 to do if the error reporting function itself fails? === How to handle errors in error-reporting functions themselves? How does one know they've failed in the first place? perror, strerror, etc
0
[ 2, 98, 20, 107, 100, 14, 7019, 6670, 1990, 1145, 13614, 60, 800, 3726, 3726, 184, 20, 3053, 11908, 19, 7019, 8, 17437, 68, 3719, 1366, 60, 184, 630, 53, 143, 59, 22, 195, 1702, 19, 14, 64, 209, 60, 351, 29992, 15, 13, 9729, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
jquery hide for multiple divs classes with IDs appended to end === I have multiple sections as divs, each with a number appended to the end of the class(class="section-'.$section.'"). There could be many of these and the id would increment each time. I am trying to write a jquery script to show and hide the correct class="resource-'.$section.'". When the user clicks on the img inside the section div, it will show hide the appropriate resource div and hide all others. <div class="section-'.$section.'"> <img src="" class="section-img-'.$section.'"/> </div> <div class="resource-'.$section.'"></div> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".resource").hide(); jQuery(".section img").click(function() { jQuery(this).next(".resource").show(); }); }); </script> Any ideas or help would be very much appreciated. Thanks in advance.
0
[ 2, 487, 8190, 93, 3077, 26, 1886, 13, 12916, 18, 2684, 29, 13, 9178, 4865, 10726, 20, 241, 800, 3726, 3726, 31, 57, 1886, 4501, 28, 13, 12916, 18, 15, 206, 29, 21, 234, 4865, 10726, 20, 14, 241, 16, 14, 718, 5, 1898, 3726, 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...
calendar extender entering today's date defaultly in textbox(when i click on calendar image to open the calendar) === I am using a **textbox** with **calendar extender**. My problem is, when i click on **calendar image**(to open the calendar), **today's** date is defaultly coming in **textbox** here is my code <asp:TextBox ID="txtExpiryDate" runat="server" Width="70px" CssClass="txt_box"></asp:TextBox> <input type="image" id="ImageStart" runat="server" src="~/images/date-picker-icon.jpg" /> <cc1:MaskedEditExtender ID="MaskedEditExtender2" TargetControlID="txtExpiryDate" MaskType="Date" Mask="99/99/9999" runat="server"></cc1:MaskedEditExtender> <cc1:calendarextender ID="Calendarextender2" OnClientDateSelectionChanged="dateSelectionChanged" OnClientShown="clientShown" TargetControlID="txtExpiryDate" Format="MM/dd/yyyy" PopupButtonID="ImageStart" Enabled="true" runat="server"> </cc1:calendarextender> how to solve this issue.. Please Help.
0
[ 2, 7036, 7206, 106, 4604, 786, 22, 18, 1231, 12838, 102, 19, 1854, 5309, 5, 3185, 31, 10840, 27, 7036, 1961, 20, 368, 14, 7036, 6, 800, 3726, 3726, 31, 589, 568, 21, 13, 1409, 11969, 5309, 1409, 29, 13, 1409, 3430, 219, 2542, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
mail() function - encoding gmail vs yahoo === $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; **charset=UTF-8**' . "\r\n"; $headers .= 'From: Mail<office@example.com>' . "\r\n"; I've got characters like čćšđ inside mail body and with this charset it works fine with gmail, but there's a problem with yahoo. So, for every mail that I want to read I need to change manualy yahoo options encoding in UTF-8. Where or what the problem is?
0
[ 2, 4216, 5, 6, 1990, 13, 8, 19608, 489, 8079, 4611, 23553, 800, 3726, 3726, 5579, 1743, 445, 800, 13, 22, 1435, 790, 8, 10898, 45, 137, 9, 387, 22, 13, 9, 13, 7, 1, 139, 1, 103, 7, 73, 5579, 1743, 445, 13, 9, 3726, 13, 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...
which fields should go in an index? === I hae a query in a postgresql database which takes too much time and I like to add an index to make it quicker, but I don't know which fields shouls I include in the index cause many of them belong to other tables and some of them are Foreign keys. I'm using hibernate and the HQL query is this one: SELECT i FROM Item i LEFT JOIN i.model.kind AS k LEFT JOIN i.model.kind.subkind AS s WHERE i.file is null " + AND i.identifier is not null AND i.identifier != '' AND i.place is not null AND i.place.id = :placeId AND ( upper(i.serial) LIKE upper(:keyword) OR upper(i.code) LIKE upper(:keyword) OR upper(i.law.law) LIKE upper(:keyword) OR upper(i.model.model) LIKE upper(:keyword) OR upper(k.kind) LIKE upper(:keyword) OR upper(s.subkind) LIKE upper(:keyword) OR upper(i.model.factory.factory) LIKE upper(:keyword) ) ORDER BY i.code, i.id The schema of the database is generated automatically from the model which looks like the one I include below. Which fields shouls I include in the index? Thanks. public class Item { @Id private Long id; private String identifier; private String code; private String serial; @ManyToOne private File file; @ManyToOne private Law law; @ManyToOne private Place place; @ManyToOne private Model model; } public class File { @Id private Long id; private String file; } public class Law { @Id private Long id; private String law; } public class Place { @Id private Long id; private String place; } public class Model { @Id private Long id; private String model; @ManyToOne private Factory factory; @ManyToOne private Kind kind; } public class Factory { @Id private Long id; private String factory; } public class Kind { @Id private Long id; private String kind; @ManyToOne private Subkind subkind; } public class Subkind { @Id private Long id; private String subkind; }
0
[ 2, 56, 2861, 378, 162, 19, 40, 4348, 60, 800, 3726, 3726, 31, 13, 16581, 21, 25597, 19, 21, 678, 6879, 18, 22402, 6018, 56, 1384, 266, 212, 85, 17, 31, 101, 20, 3547, 40, 4348, 20, 233, 32, 21927, 15, 47, 31, 221, 22, 38, 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...
what is difference between creating webservice in http and https === I am working on creating rest service in java using Jersey. I am new to this, so I bit confused about what is difference in creating services in http and https. Does we need to take care at crating services. Please guide properly. Tutorial I followed for creating service as [Click here for tutorial link][1] [1]: http://www.vogella.com/articles/REST/article.html
0
[ 2, 98, 25, 2841, 128, 2936, 2741, 11449, 19, 7775, 17, 7775, 18, 800, 3726, 3726, 31, 589, 638, 27, 2936, 760, 365, 19, 8247, 568, 2134, 9, 31, 589, 78, 20, 48, 15, 86, 31, 1142, 4230, 88, 98, 25, 2841, 19, 2936, 687, 19, 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...
Application crashes while processing the document === private void DraftProcess(ref IDocument doc) { Guid? documentID = null; using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, Functions.SetTransactionOptions())) { try { Dictionary<string, object> param = new Dictionary<string, object>(); param = GetDocument(doc); param.Add("doc", doc); param.Add("documentId", documentID); **doc =(IDocument)base.DocumentEngine.ExecuteMethod(doc.DocumentTypeName, doc.DocumentTypeVersion, CommonConstants.DOCUMENT_PROCES, param);** doc.State = States.ProcessedOK.ToString(); if (doc.Parameters.ContainsKey(CommonConstants.WORKFLOW_ACTION_ERRORS)) throw new Exception(); doc = base.DocumentEngine.UpdateDocument(doc); ts.Complete(); } catch (Exception ex) { //doc.State = States.PreRegistrationDraft.ToString(); ts.Dispose(); PepLogger.WriteApplicationLogEntry(ex.InnerException.ToString(), LogSeverityEnum.Error); } } } private Dictionary<string, object> GetDocument(IDocument documentID) { Dictionary<string, object> param = new Dictionary<string, object>(); param.Add("documentId", documentID); return param; } Hay Guys, I have problem with processing the document that I built before. I have problem crashing the application. When I debug this line that I bold is throwing exception. I tried many ways but always I get the same error. Help please. Thank You :D
0
[ 2, 3010, 21563, 133, 5511, 14, 4492, 800, 3726, 3726, 932, 11364, 2472, 16835, 5, 14057, 31, 28132, 9765, 6, 13, 1, 9457, 43, 60, 4492, 1340, 800, 16203, 73, 568, 13, 5, 7028, 8645, 11555, 13, 38, 18, 800, 78, 12799, 11555, 5, 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...
How to make Smarty automatically escape all template variables but ignore captures === I want to automatically escape all template variables, that is, I want them to be escaped without having to write `|escape` all the time. Thus I enabled the `$escape_html` option. However, apparently Smarty treats variables created using `{capture}` the same way, even though these can be considered trusted input. We have a lot of those in our codebase and having to write `nofilter` everywhere is almost as annoying as having to write `|escape`. Surely there must be a solution for this? Or are `$escape_html` and `{capture}` incompatible?
0
[ 2, 184, 20, 233, 3978, 93, 7499, 2220, 65, 22894, 12157, 47, 7174, 3683, 18, 800, 3726, 3726, 31, 259, 20, 7499, 2220, 65, 22894, 12157, 15, 30, 25, 15, 31, 259, 105, 20, 44, 5409, 366, 452, 20, 2757, 13, 1, 62, 13109, 1, 65, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Database distribution === What are the possibilities to distribute data selectively? I explain my question with an example. Consider a central database that holds all the data. This database is located in a certain geographical location. Application A needs **a subset** of the information present in the central database. Also, application A may be located in a geographical location **different (and maybe far)** from the one where the central database is located. So, I thought about creating a new database at the same location of application A that would contain a subset of information of the central database. Which technology/product allow me to deploy such a configuration? Thanks
0
[ 2, 6018, 2523, 800, 3726, 3726, 98, 50, 14, 13086, 20, 14751, 1054, 14092, 102, 60, 31, 3271, 51, 1301, 29, 40, 823, 9, 3563, 21, 521, 6018, 30, 2763, 65, 14, 1054, 9, 48, 6018, 25, 335, 19, 21, 1200, 10490, 1474, 9, 3010, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to update pager icons when using a timeout with jquery cycle === Basically I've created a slideshow with jquery cycle, which has buttons and pager navigation - each time the 'next' or 'previous' button is pressed the pager is updated to represent which slide is being shown. Now I want to add a timer to the slideshow and again update the pager navigation image to represent which slide is being shown. I've tried using timeoutFn, but I haven't been able to get it to work. Here is some of the code at the moment- I'm using a global variable 'currentBut' so i know which slide I'm currently on. $(document).ready(function() { var currentBut = ""; var lastButIndex = 0; $('#slide').cycle({ fx: 'scrollHorz', speed: 'slow', timeout: 0, next: '#next', prev: '#previous', pager: '#pager', pagerAnchorBuilder: function(idx, el) { lastButIndex = idx; return '<a src="" class="test" id="but'+idx+'" href="#"><img src="gfx/slideshowBut.jpg"></a>'; } }); currentBut = $("#but0"); currentBut.children(1).attr("src","gfx/slideshowButPressed.jpg"); $("#next").click(function(){ $(currentBut).children(1).attr("src","gfx/slideshowBut.jpg"); $(currentBut).next().children(1).attr("src","gfx/slideshowButPressed.jpg"); if($(currentBut).is(':last-child')) { $("#but0").children(1).attr("src","gfx/slideshowButPressed.jpg"); currentBut = $("#but0"); } else{ currentBut = $(currentBut).next(); } }); $("#previous").click(function(){ $(currentBut).children(1).attr("src","gfx/slideshowBut.jpg"); $(currentBut).prev().children(1).attr("src","gfx/slideshowButPressed.jpg"); if($(currentBut).is(':first-child')) { $("#but"+lastButIndex).children(1).attr("src","gfx/slideshowButPressed.jpg"); currentBut = $("#but"+lastButIndex); } else{ currentBut = $(currentBut).prev(); } }); But I'm a bit stuck on how to adapt it now- any ideas would be greatly appreciated!Thanks.
0
[ 2, 184, 20, 11100, 2478, 139, 9801, 18, 76, 568, 21, 85, 1320, 29, 487, 8190, 93, 4150, 800, 3726, 3726, 11374, 31, 22, 195, 679, 21, 18066, 1544, 29, 487, 8190, 93, 4150, 15, 56, 63, 12861, 17, 2478, 139, 8368, 13, 8, 206, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 related records in a single POST request === Using tastypie, how would I go about creating a record and several related records in a single POST request? For example, I have these two resources: class SongResource(ModelResource): playlists = fields.ToManyField('playlists.api.resources.PlaylistResource', 'playlist_set', related_name = "song", full=True) class Meta: queryset = Song.objects.all(); resource_name = 'song' authorization = Authorization() class PlaylistResource(ModelResource): song = fields.ToOneField(SongResource, 'song', full=True) class Meta: queryset = Playlist.objects.all() resource_name = 'playlist' authorization = Authorization() I'd like to create a playlist and its songs in one shot using a post request with data, something like this: var data = JSON.stringify({ 'name': 'Playlist name.', 'song': [{'song': 'Song 1'}, {'song': 'Song 2'}, {'song': 'Song 3'}] }); That doesn't seem to work. I'm told song is not valid. Can I do this or do I have to create a request for every song or do it some other way?
0
[ 2, 2936, 1597, 742, 19, 21, 345, 678, 3772, 800, 3726, 3726, 568, 12892, 1084, 9903, 15, 184, 83, 31, 162, 88, 2936, 21, 571, 17, 238, 1597, 742, 19, 21, 345, 678, 3772, 60, 26, 823, 15, 31, 57, 158, 81, 2566, 45, 718, 338, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
WCF as Business Logic === My Current Architecture Plan for my Application is UI -> WCF Bal -> Generic Dal -> Entity Model I have created generic Dal methods and the related entity and the specific operation to be performed will be handled from the Business Logic. I am trying to create a Business logic on wcf and as earlier we used to do separate classes for separate entities so from WCF context m confused how to go about ? i initially thought of creating a interface which will have generic implementation like public interface IBalService<TEntity> where TEntity:class { [OperationContract] IDictionary<int, string> Populatelist(); [OperationContract] IEnumerable<TEntity> Viewall(); [OperationContract] void Insert(TEntity obj); [OperationContract] void Update(TEntity obj); [OperationContract] void Delete(TEntity obj); } now this interface should have different implementation for different entity say Product, Category, Customer but wcf can have just one Service class... Any idea what i should do now ???
0
[ 2, 11801, 410, 28, 508, 7085, 800, 3726, 3726, 51, 866, 2607, 944, 26, 51, 3010, 25, 13, 5661, 13, 8, 1, 11801, 410, 3350, 13, 8, 1, 12733, 6868, 13, 8, 1, 9252, 1061, 31, 57, 679, 12733, 6868, 3195, 17, 14, 1597, 9252, 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...