unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Managing setters and getters methods on ruby === I'm learning about using methods on Ruby the right way. I'm interested in know if this is a common (and suggested) approach to handling setting and getters. For instance, I have a method that sets a value depending on input and I would like to call the result in different parts of the sites by simply calling `getMyMethod` as follow without needing to call the setter again. def SetMyMethod(value) if value > 10 result = 'is over 10!' else result = 'is below 10' end @methodValue = result return @methodValue end get getMyMethod return @methodValue end Is this the right approach to setting and retrieving values from methods?
0
[ 2, 5616, 309, 6052, 17, 164, 6052, 3195, 27, 10811, 800, 3726, 3726, 31, 22, 79, 2477, 88, 568, 3195, 27, 10811, 14, 193, 161, 9, 31, 22, 79, 3158, 19, 143, 100, 48, 25, 21, 757, 13, 5, 290, 2347, 6, 2141, 20, 7988, 2697, 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...
When I press Enter anywhere on a web page, why does my fixed positioned Overlay layer disappear? === I have a normal page with a login button. On clicking the login button, I use jQuery to bring up a hidden overlay layer, which contains a login form. The overlay layer is fixed positioned. When I press Enter no matter what is focused or where is mouse cursor s the the moment, the overlay layer is gone, revealing the normal page. So what is happening here? Does it have to do which form dfault button or something? But I do not seem to see any change in my normal page except the overlay is gone.
0
[ 2, 76, 31, 901, 2830, 4922, 27, 21, 2741, 2478, 15, 483, 630, 51, 3535, 12125, 84, 4414, 5385, 10866, 60, 800, 3726, 3726, 31, 57, 21, 1826, 2478, 29, 21, 6738, 108, 5167, 9, 27, 25590, 14, 6738, 108, 5167, 15, 31, 275, 487, 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...
Any tools to keep database structure continuously synchronised in PHP / MYSQL? === I have 3 development environments - dev, staging and production. (PHP/MYSQL) I am looking for a tool to synchonise my database structure across each development environment. I have a master_db_structure.sql file that contains the current database structure file. So what I need to happen is: IF I add a new table or update a table structure in dev (and then export entire db structure to master_db_structure.sql) THEN Staging automatically applies a 'CREATE TABLE' or 'ALTER TABLE' because it looks at its current structure & compares it to the master_db_structure.sql file ************** In the past I've use mysqldiff tool to create a database 'patch' file but isnt there a better way to do this? Hoping one of you boffins can help.
0
[ 2, 186, 4672, 20, 643, 6018, 1411, 11738, 13, 16023, 2541, 19, 13, 26120, 13, 118, 51, 18, 22402, 60, 800, 3726, 3726, 31, 57, 203, 522, 11246, 13, 8, 9664, 15, 16824, 17, 637, 9, 13, 5, 26120, 118, 915, 18, 22402, 6, 31, 589,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Determining the proper amount of Neurons for a Neural Network === I have been doing some research with neural networks and the concept and theory as a whole makes sense to me. Although the one question that sticks out to me, which I haven't been able to find an answer to yet, is how many neurons should be used in a Neural Net. to achieve proper/efficient results. Including Hidden Layers, neurons per Hidden Layer, etc. Do more neurones necessarily more accurate results (while being more taxing on the system) or will less neurons still be sufficient? Is there some sort of governing rule to help determine those numbers? Does it depend on the type of training/learning algorithm that is being implemented into the neural net. Does it depend on the type of data/input that is being presented to the network? If it makes it easier to answer the questions, I will most likely be using feedforwarding and backpropogation as the main method for training and prediction. On a side note, is there a prediction algorithm/firing rule or learning algorithm that is generally regraded to as "the best/most practical", or is that also dependant on the type of data being presented to the network? Thanks to anyone with any input, it's always appreciated!
0
[ 2, 13521, 14, 4119, 2006, 16, 18131, 26, 21, 17371, 982, 800, 3726, 3726, 31, 57, 74, 845, 109, 527, 29, 17371, 5540, 17, 14, 2420, 17, 1639, 28, 21, 979, 1364, 1259, 20, 55, 9, 419, 14, 53, 1301, 30, 15295, 70, 20, 55, 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...
Hpricot remove single element === I'm using Ruby's Hpricot gem to parse html. I'd like to remove a single node from the document for use elsewhere, but I can't find a way. I see that I can remove an entire list of elements, using an instance of Hpricot::Elements (`x = (doc/"div").remove`), but I only want to remove the *first instance* of a given tag. Poking around, I see the suggestion that I simply replace the element's inner text with a comment node or whitespace (`x.inner_html = ''`), but that prevents me making use of the node elsewhere. What can I do? Specs: Ruby 1.8.7, Hpricot 0.8.4
0
[ 2, 5301, 21663, 38, 4681, 345, 4520, 800, 3726, 3726, 31, 22, 79, 568, 10811, 22, 18, 5301, 21663, 38, 8551, 20, 2017, 870, 13, 15895, 9, 31, 22, 43, 101, 20, 4681, 21, 345, 15421, 37, 14, 4492, 26, 275, 6040, 15, 47, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
preg_replace output is wrong === Hello got the following problems First: if ÄÖÜ is provided with the regex the trademark sign replacement is producing a addional char �.: Second: If I do a string loop through the result all special chars are �. Question is, why is this happen, and what can I do against it? (Second question is not so nessesasary but interesting) header('Content-Type: text/html; charset=utf-8'); $testtxt = 'MicrÖsüft W!ndows® is a trÄdemark of Microfrost™ ©2012!'; $r = preg_replace('#[^\w\s\däöüß%\!\?\.,\:\-_\[\]ÄÖÜ]#is', 'X', $testtxt); echo $testtxt, '<br>', $r; echo '<hr>'; for($i = 0, $size = strlen($r); $i < $size; ++$i) { echo $r[$i], '=', ord($r[$i]), '<br>'; } Result: MicrÖsüft W!ndows® is a trÄdemark of Microfrost™ ©2012! MicrÖsüft W!ndowsXX is a trÄdemark of MicrofrostX�X XX2012! M=77 i=105 c=99 r=114 �=195 �=150.... Expected: MicrÖsüft W!ndows® is a trÄdemark of Microfrost™ ©2012! MicrÖsüft W!ndowsXX is a trÄdemark of MicrofrostXX XX2012! M=77 i=105 c=99 r=114 Ö=195 s=150....
0
[ 2, 782, 263, 1, 99, 5119, 5196, 25, 1389, 800, 3726, 3726, 10975, 330, 14, 249, 1716, 64, 45, 100, 21, 2655, 25, 1173, 29, 14, 7953, 1706, 14, 11005, 1676, 4610, 25, 4081, 21, 3547, 872, 192, 4892, 13, 9, 45, 153, 45, 100, 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...
Drawing Smooth Curves in Java Graphics === I am trying to draw smooth, bezier-type curves to fit a set of data I have in order to plot it in a java graphics drawing. Below is the code I am currently using to plot. It is plotting the points just fine, except that the curves have sharp edges and sometimes have small fractures in them. Is there a better way that I can make a smooth, fitted curve using java graphics? int numProfiles = speedList.size(); int lenOfList; System.out.println(); System.out.println("Creating a new general path"); //BasicStroke boldStroke = new BasicStroke(.3f); //((Graphics2D)g).setStroke(boldStroke); for (int i=0; i<numProfiles; i++){ GeneralPath gp = new GeneralPath(); g.setColor(colors[i]); lenOfList = speedList.get(i).length; if (lenOfList < 3) { double xPlotVal1 = xMarginLeft + (((speedList.get(i)[0].getVal() - xMin) / (xMax - xMin)) * width); double yPlotVal1 = yMarginTopAxisTop + (((depthList.get(i)[0].getVal() - yMin) / (yMax - yMin)) * height); double xPlotVal2 = xMarginLeft + (((speedList.get(i)[1].getVal() - xMin) / (xMax - xMin)) * width); double yPlotVal2 = yMarginTopAxisTop + (((depthList.get(i)[1].getVal() - yMin) / (yMax - yMin)) * height); g.drawLine((int) xPlotVal1, (int) yPlotVal1, (int) xPlotVal2, (int) yPlotVal2); } else { System.out.println("More than 2 pts"); for (int j = 0; j < (lenOfList - 2); j++) { double xPlotVal1 = xMarginLeft + (((speedList.get(i)[j].getVal() - xMin) / (xMax - xMin)) * width); double yPlotVal1 = yMarginTopAxisTop + (((depthList.get(i)[j].getVal() - yMin) / (yMax - yMin)) * height); double xPlotVal2 = xMarginLeft + (((speedList.get(i)[j + 1].getVal() - xMin) / (xMax - xMin)) * width); double yPlotVal2 = yMarginTopAxisTop + (((depthList.get(i)[j + 1].getVal() - yMin) / (yMax - yMin)) * height); double xPlotVal3 = xMarginLeft + (((speedList.get(i)[j + 2].getVal() - xMin) / (xMax - xMin)) * width); double yPlotVal3 = yMarginTopAxisTop + (((depthList.get(i)[j + 2].getVal() - yMin) / (yMax - yMin)) * height); gp.moveTo(xPlotVal1, yPlotVal1); if (j==0) gp.moveTo(xPlotVal1, yPlotVal1); // gp.moveTo(xPlotVal1, yPlotVal1); gp.curveTo(xPlotVal1, yPlotVal1, xPlotVal2, yPlotVal2, xPlotVal3, yPlotVal3); } ((Graphics2D) g).draw(gp); } }
0
[ 2, 3533, 3905, 11548, 19, 8247, 8351, 800, 3726, 3726, 31, 589, 749, 20, 2003, 3905, 15, 44, 15029, 8, 4474, 11548, 20, 2742, 21, 309, 16, 1054, 31, 57, 19, 389, 20, 3798, 32, 19, 21, 8247, 8351, 3533, 9, 1021, 25, 14, 1797, 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...
Trying to add command-line argument execution to NSIS installer === I am trying to customize the NSIS installer. Based on an option from the user, I would like the program to run with a different option, which I would set up with a command line option. (I save some files that I delete at the end, and if the user doesn't want to proceed with the install, then I want to run the utility with the option -d that only deletes temporary files.) I have found this post: http://stackoverflow.com/questions/6185982/accessing-command-line-arguments-in-nsis but I don't know how to set it up to run a program with a command-line argument. This is what I am trying: I tried: !define MY_FILE "file.exe -d" File /nonfatal "${MY_FILE}" I got a warning that it didn't find `file.exe -d`. So I am trying something like $(GetOptions) $CMDLINE "/d" $Trying_This ;Not sure what to put to get the program I am still experimenting with NSIS, it is a huge challenge, and can't find an example to guide me.
0
[ 2, 749, 20, 3547, 1202, 8, 1143, 5476, 5769, 20, 13, 103, 4557, 16146, 106, 800, 3726, 3726, 31, 589, 749, 20, 5816, 2952, 14, 13, 103, 4557, 16146, 106, 9, 432, 27, 40, 4255, 37, 14, 4155, 15, 31, 83, 101, 14, 625, 20, 485, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Access Fragments View from Outside OnCreateView Method === Have searched around for this but everyone of them is for the onCreateView() method where you can access the Fragments view via the inflater. public View onCreateView(LayoutInflater inflater, ViewGroup group, Bundle saved) { super.onCreateView(inflater, group, saved); View view = inflater.inflate(R.layout.photosfrag, group, false); What I want to know is how to do this dynamically. For example say I am using an activity to show a fragment and call a method in the fragment such as: public void setTitleText(String title) { TextView nameView = (TextView)getView().findViewById(R.id.titleTxtView); nameView.setText(title); } Just because the fragment is already created and it would be a way of dynamically changing it. Any help would be grand. I may doing it all wrong.
0
[ 2, 1381, 10837, 1418, 37, 719, 27, 6037, 1373, 4725, 2109, 800, 3726, 3726, 57, 9036, 140, 26, 48, 47, 1266, 16, 105, 25, 26, 14, 27, 6037, 1373, 4725, 5, 6, 2109, 113, 42, 92, 1381, 14, 10837, 1418, 1197, 14, 19, 410, 4877, 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...
LINQ, why is it not updating please? === FAO: abatishchev i cant seem to work out why this is not updating my categoryID, it seems to be updating everything else!! Basically the first bit check the db to see if the product is in the DB, depending on the product SKU, if it exists then it will process it, and update. Otherwise it will create a new product in the DB. Also does any one know how i can return the exception error message please? [WebMethod] public SyncTWE[] SyncWithTWE() { int index = 0; int size = 100; decimal weight = 0; int vintage = 0; int age = 0; try { string[] tweProductIds = GetProductSkus(); List<TWEProduct> TWEProducts = new List<TWEProduct>(); // TWEService needs to be disposed once we're finished with it using (TWEService tweWebService = new TWEService()) { // Instead of trying to get thousands of items at once (and risking the web-service // at the other end timing out), send multiple requests across in chunks of 100 or // less... while (index < tweProductIds.Count()) { if (tweProductIds.Count() - index < size) { size = tweProductIds.Count() - index; } string[] subset = tweProductIds.Skip(index).Take(size).ToArray<string>(); index += size; // We've got data back, so add it to the list TWEProducts.AddRange(tweWebService.GetTWEProductList(subset).ToList()); } } using (aboDataDataContext dc = new aboDataDataContext()) { foreach (TWEProduct p in TWEProducts) { var match = (from t in dc.tweProducts where t.sku == p.productcode select t).FirstOrDefault(); if (match == null) { // Watch out here; there is some type conversion required for certain fields! tweProduct prod = new tweProduct() { sku = p.productcode, categoryId = dc.Categories.Single(c => c.Name == p.category).Id, title = p.name, brand = p.manufacturer, description = p.description, twePrice = p.price, weight = decimal.TryParse(p.size, out weight) == true ? (int?)weight : null, size = decimal.TryParse(p.size, out weight) == true ? (int?)weight : null, contry = p.country, region = p.region, vintage = int.TryParse(p.vintage, out vintage) == true ? (int?)vintage : null, strength = p.strength, bottler = p.bottler, age = int.TryParse(p.age, out age) == true ? (int?)age : null, caskType = p.casktype, series = p.series, flavour = p.flavour, stock = p.freestock, tweUpdated = false, stockUpdated = false, priceUpdated = false, dataUpdated = false, imgPublished = false, lastUpdated = DateTime.Now }; // Add the new object to the tweProducts table (only in memory here) dc.tweProducts.InsertOnSubmit(prod); } else { // update row match.tweUpdated = true; //Set if an item has been updated or not. if (match.stock == p.freestock) { match.stockUpdated = false; } else { match.stockUpdated = true; } if (match.twePrice == p.price) { match.priceUpdated = false; } else { match.priceUpdated = true; } match.dataUpdated = false; match.imgPublished = false; match.sku = p.productcode; match.categoryId = dc.Categories.Single(c => c.Name == p.category).Id; match.title = p.name; match.brand = p.manufacturer; match.description = p.description; match.twePrice = p.price; match.weight = decimal.TryParse(p.size, out weight) == true ? (int?)weight : null; match.size = decimal.TryParse(p.size, out weight) == true ? (int?)weight : null; match.contry = p.country; match.region = p.region; match.vintage = int.TryParse(p.vintage, out vintage) == true ? (int?)vintage : null; match.strength = p.strength; match.bottler = p.bottler; match.age = int.TryParse(p.age, out age) == true ? (int?)age : null; match.caskType = p.casktype; match.series = p.series; match.flavour = p.flavour; match.stock = p.freestock; match.tweUpdated = true; match.dataUpdated = false; match.imgPublished = false; match.lastUpdated = DateTime.Now; } } // Finally, request Linq to perform the database updates. dc.SubmitChanges(); } return null; } catch (Exception ex) { string error = ex.Message.ToString(); return null; } }
0
[ 2, 6294, 1251, 15, 483, 25, 32, 52, 71, 43, 1880, 2247, 60, 800, 3726, 3726, 1399, 111, 45, 21, 4900, 1595, 13860, 31, 2973, 2260, 20, 170, 70, 483, 48, 25, 52, 71, 43, 1880, 51, 3230, 1340, 15, 32, 2206, 20, 44, 71, 43, 188...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IE z-index bug doesn't properly display divs === I have two divs one inside another, i would like to overlap one div with other and also use css idnex, but ie doesn't let me do this, is there some kind of workaround? **Please view this code in IE since it works in other browsers.** Here is jsfiddle: http://jsfiddle.net/xkDCX/1/ And the code: <div class="container"> <div class="button"></div> <div> body{ margin:50px; } .container{ position:relative; width:410px; height: 300px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf5fd', endColorstr='#0dbcf5'); z-index:22; } .button{ width:20px; height:20px; border:2px solid black; position:absolute; right:-10px; top:-10px; background:black; z-index:11; }
0
[ 2, 13, 660, 2052, 8, 25671, 6256, 1437, 22, 38, 7428, 3042, 13, 12916, 18, 800, 3726, 3726, 31, 57, 81, 13, 12916, 18, 53, 572, 226, 15, 31, 83, 101, 20, 15406, 53, 13, 12916, 29, 89, 17, 67, 275, 272, 18, 18, 4924, 22420, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to see if local git repo and remote repo are same commit? === I have a local git repo, and I have a remote git repo. What is a simple command to see what commit the remote repo is, and what commit the local repo is, so I can simple see if I'm up to date? This is going to be automated in a program, so I don't want lots of complicated stuff that I would have to parse. Preferably it would be cool to have both local & remote output the same text, with only the commit changing between the two. Any ideas?
0
[ 2, 184, 20, 196, 100, 375, 13, 10404, 302, 1638, 17, 5388, 302, 1638, 50, 205, 9686, 60, 800, 3726, 3726, 31, 57, 21, 375, 13, 10404, 302, 1638, 15, 17, 31, 57, 21, 5388, 13, 10404, 302, 1638, 9, 98, 25, 21, 1935, 1202, 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...
Only load lower media queries for IE === I'd like to serve IE7 only the lower media queries (because I don't want to fix all the higher layouts), but I can't get conditional tags to work with this. Am I doing something wrong? I've used respond.js (https://github.com/scottjehl/Respond), so it should be fine, but the conditional tags prevent all browsers from loading the higher media queries. What should happen is that all browsers should load all media queries, whereas IE7 and downwards should only load my 601.css and 768.css stylesheets <link rel="stylesheet" type="text/css" media="all" href="http://www.example.com/style.css" /> <link rel="stylesheet" href="http://www.example.com/mq/601.css" type="text/css" media="(min-width: 601px)"/> <link rel="stylesheet" href="http://www.example.com/mq/768.css" type="text/css" media="(min-width: 768px)"/> <!--[if gt IE 7]> <link rel="stylesheet" href="http://www.example.com/mq/1024.css" type="text/css" media="(min-width: 1024px)"/> <link rel="stylesheet" href="http://www.example.com/mq/1280.css" type="text/css" media="(min-width: 1280px)"/> <link rel="stylesheet" href="http://www.example.com/mq/1600.css" type="text/css" media="(min-width: 1600px)"/> <![endif]-->
0
[ 2, 104, 6305, 987, 941, 9386, 2829, 26, 13, 660, 800, 3726, 3726, 31, 22, 43, 101, 20, 1884, 13, 660, 465, 104, 14, 987, 941, 9386, 2829, 13, 5, 4451, 31, 221, 22, 38, 259, 20, 6098, 65, 14, 1184, 9106, 18, 6, 15, 47, 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...
HTML canvas - drawing disappear on resizing === I have created a basic shape in HTML canvas element which works fine. The problem occurs when I resize the canvas, all the drawing in the canvas disappears. Is this the normal behavior? or is there a function that can be used to stop this? One way to fix this could be to call drawing function again on canvas resize however this may not be very efficient if there is huge content to be drawn. What's the best way? Here is the link to sample code https://gist.github.com/2983915
0
[ 2, 13, 15895, 9696, 13, 8, 3533, 10866, 27, 10719, 3335, 800, 3726, 3726, 31, 57, 679, 21, 2125, 2539, 19, 13, 15895, 9696, 4520, 56, 693, 1123, 9, 14, 1448, 3690, 76, 31, 302, 10454, 14, 9696, 15, 65, 14, 3533, 19, 14, 9696, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a DynamicEnumProperty in rule file === Could someone please help me to know about DynamicEnumProperty and its attributes i.e. - EnumProvider - ProviderSettings As far as I think they are values dumped by previous task to the current executing task and of which - Is the source which provides the list like a target file. - The protocol for the values to be passed respectively
0
[ 2, 98, 25, 21, 7782, 219, 723, 10890, 106, 1084, 19, 1828, 3893, 800, 3726, 3726, 110, 737, 2247, 448, 55, 20, 143, 88, 7782, 219, 723, 10890, 106, 1084, 17, 82, 13422, 31, 9, 62, 9, 13, 8, 1957, 723, 26735, 139, 13, 8, 11747,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Http Date to NSDate === I have a string take from http response header field "Date" in this format: "Sun, 24 Jun 2012 16:34:51 GMT" what i want is to convert this string in a NSDate object. For this scope i ha instanziate a NSDateFormatter using various format: [dateFormatter setDateFormat:@"EEE',' dd' 'MMM' 'yyyy HH':'mm':'ss zzz"]; [dateFormatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss zzz"]; [dateFormatter setDateFormat:@"EEE',' dd' 'MMM' 'yyyy HH':'mm':'ss 'GMT'"]; bu when i'll go to print the string from date using: [dateFormatter dateFromString:date] i recive: (null) where am I doing wrong?
0
[ 2, 7775, 1231, 20, 13, 2172, 8209, 800, 3726, 3726, 31, 57, 21, 3724, 247, 37, 7775, 1627, 157, 106, 575, 13, 7, 8209, 7, 19, 48, 2595, 45, 13, 7, 7843, 15, 937, 7446, 563, 347, 21524, 23090, 12600, 38, 7, 98, 31, 259, 25, 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...
Stop ubuntu kernel update === I'm setting up the family pc for my parents and i want to leave ubuntu installed. Since they don't know anything about computers and i live out of the country, I wannna leave the whole thing ready for them. I was wondering if there's any way that i can block kernel updates, because sometimes a kernel update requires re-installation/update of software or controllers and they don't know how to do it. is there any way to set updates blocking out the kernel one?
2
[ 2, 747, 287, 12968, 2473, 17007, 11100, 800, 3726, 3726, 31, 22, 79, 2697, 71, 14, 190, 5168, 26, 51, 1144, 17, 31, 259, 20, 767, 287, 12968, 2473, 4066, 9, 179, 59, 221, 22, 38, 143, 602, 88, 7774, 17, 31, 515, 70, 16, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
convert method to generics === I have the following method signature, how do i convert it to be a template. public static JSONContainer getMappedRootObject(JSONContainer clazz, String filename) { ....... JSONContainer container = new Gson().fromJson(br, JSONContainer.class); return container; } This is what i came up with, is this right?? public static <T extends Object> T getMappedRootObject(Class<T> clazz, String filename) { T container = new Gson().fromJson(br, clazz); return container; }
0
[ 2, 8406, 2109, 20, 12733, 18, 800, 3726, 3726, 31, 57, 14, 249, 2109, 7810, 15, 184, 107, 31, 8406, 32, 20, 44, 21, 22894, 9, 317, 12038, 487, 528, 1126, 5851, 106, 164, 79, 16664, 14032, 23793, 5, 728, 528, 1126, 5851, 106, 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...
Redirect user to Google translated version after checking navigator language or headers === Upon finding out that user's language is different than my site's language I show him google translate toolbar. But I found out that nearly nobody uses it. So I need to redirect user to google translated version Of page. I check language even from navigator.language or from http headers. How can I redirect him after that step?
0
[ 2, 302, 14706, 4155, 20, 8144, 4331, 615, 75, 9886, 21432, 816, 54, 157, 445, 800, 3726, 3726, 685, 3007, 70, 30, 4155, 22, 18, 816, 25, 421, 119, 51, 689, 22, 18, 816, 31, 298, 61, 8144, 20628, 5607, 1850, 9, 47, 31, 216, 70,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 not getting applied === I have a JQuery tokeninput auto-complete code which is placed inside the document.ready function. The tokeninput is applied to the text box. This code works fine for the text box placed inside the body tags. I have a template. Inside the template I have a popup which contains a text box. When I applied the same JQuery token-input code to this text box inside the popup. It doesn't work for that.. Does the popup have their own events as like the document ready function or something similar like that.. So where can I put my JQuery tokeninput auto-complete code inside popup or template.
0
[ 2, 3108, 15990, 52, 1017, 2435, 800, 3726, 3726, 31, 57, 21, 487, 8190, 93, 20, 2853, 108, 4881, 3108, 8, 15990, 1797, 56, 25, 1037, 572, 14, 4492, 9, 15193, 1990, 9, 14, 20, 2853, 108, 4881, 25, 2435, 20, 14, 1854, 1649, 9, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Persistent values for an object in Android and performance === Imagine a app showing the user statistics. I could have an Object like: public class Statistic { private int id,value; } Where the value should persist between different app executions. Using an database for the persistent system the databaseAdapter could have a: public void saveStatisticValue(int id,int newValue); public int getStatisticValue(int id); Using that calls to the DataBase Adapter in the getter/setter method of the object could impact in the app performance if called from the UI thread due to the database delay. For example if I want to show an Activity with all the Statistics, the database delay of the getter of each Statistic object could result in a ARN. public class Statistic { .... public synchronized void setValue(int newValue) { dbAdapter.saveStatisticValue(this.getId(),newValue); } public synchronized int getValue() { return dbAdapter.getStatisticValue(this.getId()); } .... } Is there some kind of approach for reduce the database impact for this kind of models? Thanks
0
[ 2, 15348, 4070, 26, 40, 3095, 19, 13005, 17, 956, 800, 3726, 3726, 4382, 21, 4865, 3187, 14, 4155, 5818, 9, 31, 110, 57, 40, 3095, 101, 45, 317, 718, 25199, 13, 1, 932, 19, 38, 4924, 15, 15165, 73, 13, 1, 113, 14, 1923, 378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 running issue in android emulator === I am trying to run an app in android emulator which has GPU Emulation enabled.My app was working fine, but suddenly it stopped working and i can see in stack trace mesage is 07-13 17:05:17.011: E/EGL_emulation(1437): rcMakeCurrent returned EGL_FALSE 07-13 17:05:17.024: E/EGL_emulation(1437): tid 1450: eglMakeCurrent(952): error 0x3006 (EGL_BAD_CONTEXT) Anyone faced this problem, please share your solution if anything you have.Thanks
0
[ 2, 3010, 946, 1513, 19, 13005, 3579, 14868, 800, 3726, 3726, 31, 589, 749, 20, 485, 40, 4865, 19, 13005, 3579, 14868, 56, 63, 489, 4201, 3579, 11123, 9338, 9, 915, 4865, 23, 638, 1123, 15, 47, 1605, 32, 1175, 638, 17, 31, 92, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to extract images sequence from video? === Any recommendation other than VirtualHub? Because I need to find another software to compare with VirtualHub for my assignment. If possible, suggest the software that have to purchase full version. Thanks.
4
[ 2, 184, 20, 10962, 3502, 4030, 37, 763, 60, 800, 3726, 3726, 186, 14066, 89, 119, 6599, 20926, 60, 185, 31, 376, 20, 477, 226, 2306, 20, 11590, 29, 6599, 20926, 26, 51, 8427, 9, 100, 938, 15, 5601, 14, 2306, 30, 57, 20, 3301, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Zend_Auth breaks video stream? === In one of my controllers I want to stream mp4-video through nginx. I have it set up like this: public function streamAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(TRUE); if ($this->view->user) { //<--if I skip this check - everything works fine $this->getResponse() ->setHeader('Content-Disposition', 'inline; filename=video.mp4') ->setHeader('X-Accel-Redirect', '/media/video/video.mp4') ->setHeader('Content-type', 'video/mp4') ->setHeader('Content-length', '2219550244') ; } } Earlier in a plugin with `preDispatch` I set the user property for the view: ... $view = $layout->getView(); $user = Application_Model_User::get_auth_user(); // there I check the usual Zend_Auth `hasIdentity()` $view->user = $user; ... but it really doesn't matter where I check user identity, if I check it - the video stream doesn't work in Firefox (it complains on `text/html decoder`) and Opera, but still works in Chrome. I suppose something is being output with the video if Zend_Auth `hasIdentity` is called. But I really dont understand: I do the check early in the plugin and just assign the result to a view property. If I dont check the property before setting response headers - everything is ok. If I check the view property - then the stream is corrupted, but how? Also, are there any practices with video streaming like this with Zend security system employed?
0
[ 2, 10526, 43, 1, 1346, 96, 7947, 763, 3766, 60, 800, 3726, 3726, 19, 53, 16, 51, 9919, 18, 31, 259, 20, 3766, 4628, 300, 8, 14785, 120, 13, 2723, 108, 396, 9, 31, 57, 32, 309, 71, 101, 48, 45, 317, 1990, 3766, 8645, 5, 6, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Extract the first part of a string from a filename in a batch file, then move the file in a for loop === I have a batch file here: StackOverflows "code" window doesn't show anything when I press it so hopefully it doesn't butcher it: @echo off echo Moving files to respective folders. DIR C:\ArcConverted\adam\shapefiles\ /A:-D /B > C:\ArcConverted\adam\filelist.txt echo File start > C:\ArcConverted\adam\output.txt FOR /f %%a IN (C:\ArcConverted\adam\filelist.txt) DO ( FOR /f "tokens=1 delims=_" %%b IN ('%%a') do echo A:%%a B: %%b IF NOT EXIST C:\ArcConverted\adam\shapefiles\%%~na\ mkdir C:\ArcConverted\adam\shapefiles\%%~na\ echo Moving file %%a into C:\ArcConverted\adam\shapefiles\%%~na\ move C:\ArcConverted\adam\shapefiles\%%a C:\ArcConverted\adam\shapefiles\%%~na\%%b ) pause I have files in C:\ArcConverted\adam\shapefiles that are newly forward-converted ArcGIS shapefiles, and their filenames are now: thisthing_arc.adf thisthing_tic.adf thisthing_shp.shp thatthing_shp.shp ... and so on. I have 83 of these different object sets, and each has about 16 files. I am trying to make a batch script (and yes, it has to be batch) that reads all the files in the folder, puts it in a file, then reads the list of files and and creates folders for each of them if you take out everything past the _ (the _ is added to it from the converter program). My script does not work though. The second for loop opens each file and reads everything and prints out hundreds of thousands of lines. I can't seem to figure out how to do string delimiting on file names using batch (I don't care about whats in the file). Summary: I have file sets that all belong in the same folder thrown into the same folder. I am trying to progmatically (through batch) get the name of the set from the file name (everything that occurs before the _), make that folder, then move the file into that folder. Any files that also belong in that folder will get moved there too as the loop advances. Am I heading in the right direction? Thanks.
0
[ 2, 10962, 14, 64, 141, 16, 21, 3724, 37, 21, 3893, 7259, 19, 21, 13064, 3893, 15, 94, 780, 14, 3893, 19, 21, 26, 5293, 800, 3726, 3726, 31, 57, 21, 13064, 3893, 235, 45, 7566, 2549, 9990, 18, 13, 7, 9375, 7, 1463, 1437, 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...
Index file not loading in Google App Engine using struts2 === I am getting the below error when I try to access my struts2 tiles application (in google app engine) There is no Action mapped for namespace [/] and action name [] associated with context path []. - [unknown location] Below is the stack trace Stacktraces There is no Action mapped for namespace [/] and action name [] associated with context path []. - [unknown location] com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185) org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63) org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:60) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:78) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:369) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) org.mortbay.jetty.Server.handle(Server.java:326) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) My web.xml file content is: <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>com.sbipensioner.listener.Struts2ListenerOnGAE</listener-class> </listener> <listener> <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class> </listener> <context-param> <param-name>tilesDefinitions</param-name> <param-value>/WEB-INF/tiles.xml</param-value> </context-param> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app> I dont know why its not loading index.html by default. Please advise. Regards, Mugil
0
[ 2, 4348, 3893, 52, 12797, 19, 8144, 4865, 1406, 568, 18316, 18, 135, 800, 3726, 3726, 31, 589, 1017, 14, 1021, 7019, 76, 31, 1131, 20, 1381, 51, 18316, 18, 135, 14836, 3010, 13, 5, 108, 8144, 4865, 1406, 6, 80, 25, 90, 1028, 208...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 drag and drop row within the same datagridview === In a Windows App (Visual Studio)(VB) how do you drag and drop a single row to another postition to allow for the user to re-order the row? I haven't found any worthy examples for this yet.
0
[ 2, 184, 20, 5501, 17, 2804, 3131, 363, 14, 205, 1054, 16375, 4725, 800, 3726, 3726, 19, 21, 1936, 4865, 13, 5, 20893, 1120, 6, 5, 20468, 6, 184, 107, 42, 5501, 17, 2804, 21, 345, 3131, 20, 226, 678, 9861, 20, 1655, 26, 14, 415...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 remove the bad cast HINSTANCE to int? === I'm compiling a program on gcc by using `-Wbad-function-cast` flag. The gcc show the following warning: `cast does not match function type` this is line of warning: `int ret = (int) `[`FindExecutable(file, NULL, result)`][1] The question is: it's possible remove it? maybe casting to another windows data type, but that I handling it as an integer. Any help is very appreciated. Thanks in advance. [1]: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776419%28v=vs.85%29.aspx
0
[ 2, 184, 107, 31, 4681, 14, 896, 1325, 9349, 384, 2416, 20, 19, 38, 60, 800, 3726, 3726, 31, 22, 79, 24378, 21, 625, 27, 489, 3384, 34, 568, 13, 1, 8, 499, 5989, 8, 22359, 8, 6146, 1, 3157, 9, 14, 489, 3384, 298, 14, 249, 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...
python: raise child_exception, OSError: [Errno 2] No such file or directory === I execute a command in python using subprocess.popen() function like the following: omp_cmd = 'cat %s | omp -h %s -u %s -w %s -p %s -X -' %(temp_xml, self.host_IP, self.username, self.password, self.port) xmlResult = Popen(omp_cmd, stdout=PIPE, stderr=STDOUT) In the shell it runs fine without error, but in python I get: File "/home/project/vrm/apps/audit/models.py", line 148, in sendOMP xmlResult = Popen(omp_cmd, stdout=PIPE, stderr=STDOUT) File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/local/lib/python2.7/subprocess.py", line 1228, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory I searched the error but none of them solved my problem. Does anyone know what's the cause of this issue? Thanks.
0
[ 2, 20059, 45, 3972, 850, 1, 10066, 872, 15, 13, 759, 29992, 45, 636, 106, 139, 251, 172, 500, 90, 145, 3893, 54, 16755, 800, 3726, 3726, 31, 15644, 21, 1202, 19, 20059, 568, 972, 16835, 9, 6057, 219, 5, 6, 1990, 101, 14, 249, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Marking sections of X11 window as draggable === In case I want to have an undecorated window (for example, I may paint the decorations myself), is there a way to tell the current X11 window manager that a region of window should be draggable and managed by the window manager? I'm interested in low-level solutions (Xlib, XCB or similar). I'm also looking for as standard solution as possible. In addition, can I mark an area of window as representing the close button? I'm asking about this because it'd be great if I could attach additional content on window's decoration. This is inspired by Apple's OS X, where all decorations are plain old `NSView`s and some (close buttons, etc) can even be accessed in a documented way. Adding additional content is also inspired by OS X, where one can right click on the name of the document associated with the window (on the title bar) and get the path to the document. At the same time, window remains movable even if the application is unresponsive, so the draggable area must have somehow been communicated to the window manager (that is, the `WindowServer`, right?). So, if there is a standard way (or a widespread FreeDesktop.org extension, or something else) to do this under X11, I'd love to know about it. :-)
0
[ 2, 10644, 4501, 16, 993, 1306, 1463, 28, 5501, 263, 579, 800, 3726, 3726, 19, 610, 31, 259, 20, 57, 40, 3968, 15283, 7432, 1463, 13, 5, 1106, 823, 15, 31, 123, 5107, 14, 16845, 992, 6, 15, 25, 80, 21, 161, 20, 494, 14, 866, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 plot packets vs seconds using pcap file === Using the tshark i tried to generate a dat file. The following is the command that I used to generate the fields using tshark $ C:\Program Files (x86)\Wireshark>tshark.exe -r "C:\swp-final-30.0.0.13.pcap" -T fields -e frame.number -e frame.time -e eth.src -e eth.dst -e ip.src -e ip.ds t -e ip.proto -E header=y -E separator=, -E quote=d -E occurrence=f > C:\thirty. dat Tshark generates the output file in this format. 409 Jul 14, 2012 17:50:19.435836000 00:04:23:b7:3e:a3 00:04:23:b7:1a:0b 20.0.0.13 30.0.0.13 6 410 Jul 14, 2012 17:50:19.436084000 00:04:23:b7:3e:a3 00:04:23:b7:1a:0b 20.0.0.13 30.0.0.13 6 411 Jul 14, 2012 17:50:19.436110000 00:04:23:b7:1a:0b 00:04:23:b7:3e:a3 30.0.0.13 20.0.0.13 6 1) I want to plot a graph for the numbers packets per second. How do I calculate the number of packets using the above mentioned data for specific flow. 2) How do generate a log for the specific flows matching ip.dst== 30.0.0.13 from the large pcap file. Kindly let me know how to do this. Thanks, Anand
0
[ 2, 184, 20, 3798, 12795, 18, 4611, 2582, 568, 351, 4666, 3893, 800, 3726, 3726, 568, 14, 13, 38, 28178, 31, 794, 20, 7920, 21, 1331, 38, 3893, 9, 14, 249, 25, 14, 1202, 30, 31, 147, 20, 7920, 14, 2861, 568, 13, 38, 28178, 5579...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FB API: Create Canvas === How to create (new) canvas and append canvas to a fb page via API? I worry, I could not find this in the fb graph documentation :-( Thanks for tips
0
[ 2, 13, 13478, 21, 2159, 45, 1600, 9696, 800, 3726, 3726, 184, 20, 1600, 13, 5, 2681, 6, 9696, 17, 4865, 2451, 9696, 20, 21, 13, 13478, 2478, 1197, 21, 2159, 60, 31, 3189, 15, 31, 110, 52, 477, 48, 19, 14, 13, 13478, 7210, 1394...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Can anyone describe the process flow for ranges? === http://jsfiddle.net/JonVisc/ufHBd/ So in the jsFiddle the basic steps are to: - Click anywhere on 'Hello World' (not highlighting): Range is: true - Drag to highlight (highlight 'll Wor' as an example: Range is: false - Click anywhere in that highlighted range: Range is: false Directly following that point the highlighting goes away, is this an event? Basically I need to detect that clearing of the highlighting (and subsequently clear a saved range since the highlighting is not there) but I unfortunately don't know how. A click (not highlighting after that) returns the expected result of false but since I wanted that result in the previous click this isn't ideal.
0
[ 2, 92, 1276, 4996, 14, 953, 3312, 26, 9230, 60, 800, 3726, 3726, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 9782, 3762, 150, 118, 5532, 18098, 43, 118, 86, 19, 14, 487, 18, 1707, 12312, 14, 2125, 2382, 50, 20, 45, 13, 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...
Java Gui Automatically Resizing === Here is where the GUI is drawn(note, the class extends JFrame). public Cache() { SubstanceColorChooserUI col = new SubstanceColorChooserUI(); while (mode == 0); setResizable(false); setTitle("Cache"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 483, 374); setLocationRelativeTo(null); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(new BorderLayout()); textField = new JTextField(); textField.setBounds(10, 11, 328, 20); contentPane.add(textField); textField.setColumns(10); JButton btnLoadCache = new JButton("Load cache"); btnLoadCache.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { String loc = textField.getText(); if (loc.equals("")) { JOptionPane.showMessageDialog(SpriteEditor.this, "Please specify a location for the cache.", "Unable to load", JOptionPane.ERROR_MESSAGE); return; } if (!loc.endsWith("\\")) loc = loc + "\\"; cache = new Store(loc); loadImages(); } catch (Exception e) { JOptionPane.showMessageDialog(SpriteEditor.this, "Cache failed to initialize.\n" + e.getMessage(), "Unable to load", JOptionPane.ERROR_MESSAGE); } } }); btnLoadCache.setBounds(351, 9, 112, 23); contentPane.add(btnLoadCache); JSplitPane splitPane = new JSplitPane(); splitPane.setDividerLocation(150); splitPane.setContinuousLayout(true); splitPane.setBounds(10, 44, 453, 279); contentPane.add(splitPane); JPanel panellie = new JPanel(); panellie.setLayout(new BorderLayout(0, 0)); panel = new ImagePanel(null); scrollPane_1 = new JScrollPane(); panellie.add(scrollPane_1, "Center"); scrollPane_1.setViewportView(panel); splitPane.setRightComponent(panellie); JPanel panel_1 = new JPanel(); splitPane.setLeftComponent(panel_1); panel_1.setLayout(new BorderLayout(0, 0)); JScrollPane scrollPane = new JScrollPane(); panel_1.add(scrollPane, BorderLayout.CENTER); model = new DefaultListModel<ListedImage>(); list = new JList<ListedImage>(model); list.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent arg0) { if (arg0.getValueIsAdjusting()) return; ListedImage img = list.getModel().getElementAt(list.getSelectedIndex()); panel.setImage(img.getImage()); } }); scrollPane.setViewportView(list); progressBar = new JProgressBar(); progressBar.setStringPainted(true); progressBar.setDoubleBuffered(true); progressBar.setBounds(10, 328, 453, 14); contentPane.add(progressBar); } How would I make it so when I setResizeable to true and I start dragging the program to be bigger and smaller, how do I make it so that the components inside of the frame(buttons, labels, etc) resize when the whole Frame is resizes
0
[ 2, 8247, 9457, 7499, 10719, 3335, 800, 3726, 3726, 235, 25, 113, 14, 9457, 25, 3160, 5, 10280, 15, 14, 718, 9073, 487, 8361, 6, 9, 317, 16522, 5, 6, 13, 1, 9442, 11282, 2613, 759, 106, 5661, 3313, 800, 78, 9442, 11282, 2613, 759...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Products and different types of products === How would I draw up this design in a database? - A product can be physical, digital, or a service. - A digital product is a product. - A physical product is a product. - A service is a product. Would it be advisable to use a different unique identifier than just an auto-incremented id? Perhaps a hash of the `id` and some other identifier?
0
[ 2, 1985, 17, 421, 2551, 16, 1985, 800, 3726, 3726, 184, 83, 31, 2003, 71, 48, 704, 19, 21, 6018, 60, 13, 8, 21, 2374, 92, 44, 1825, 15, 1888, 15, 54, 21, 365, 9, 13, 8, 21, 1888, 2374, 25, 21, 2374, 9, 13, 8, 21, 1825, 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...
Get a Grid's Filter Parameters === I'm using jQGrid and I'm wondering if there is a way to get the current filters that have been applied to the grid I'm viewing. For example, if the grid has been sorted by a certain column (asc or desc), search parameters that may have been applied, etc. Here is my problem: I would like to pass some parameters back to the previous grid I was viewing (or the last page) so that I can see the previous grid as it was when I navigated forward. Basically, I have a link the user will click which navigates back to the page with the previous grid they were viewing. I want to pass the filter parameters along with that link. Thanks for the help!
0
[ 2, 164, 21, 7354, 22, 18, 11945, 12905, 800, 3726, 3726, 31, 22, 79, 568, 487, 1251, 16375, 17, 31, 22, 79, 5712, 100, 80, 25, 21, 161, 20, 164, 14, 866, 21062, 30, 57, 74, 2435, 20, 14, 7354, 31, 22, 79, 11244, 9, 26, 823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 static internal pages in wordpress and === So I'm converting a few internal pages from our wordpress powered site into basic .html static pages so I can consolidate CSS and JS files. Instead of http://www.buildinghunter.com/construction-leads/, I'll create a html file and upload it to http://www.buildinghunter.com/construction-leads.html. Two questions: 1. What do I need to add to our htaccess file so it'll redirect from the original page to the new .html page? 2. What do I need to add to our htaccess file so the page will load with a back slash "/" at the end instead of ".html"? I don't want to lose links pointing to the page for obvious reasons. For reference our htaccess file looks like such: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress RewriteCond %{HTTP_HOST} ^buildinghunter\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.buildinghunter\.com$
0
[ 2, 2936, 12038, 3117, 4434, 19, 833, 5890, 17, 800, 3726, 3726, 86, 31, 22, 79, 19583, 21, 310, 3117, 4434, 37, 318, 833, 5890, 7462, 689, 77, 2125, 13, 9, 15895, 12038, 4434, 86, 31, 92, 25683, 272, 18, 18, 17, 487, 18, 6488, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Select by ID with variable === I have a code that create some spans and each span have his own ID counter1 counter2 counter4 by his name in the database. Now i'm trying to reach his value so I tryied something like this var id = // Any number that have a span. var Counter = $("#counter" + id).val(); alert(Counter); Any it's just showing NaN
0
[ 2, 487, 8190, 93, 5407, 34, 4924, 29, 7612, 800, 3726, 3726, 31, 57, 21, 1797, 30, 1600, 109, 16967, 17, 206, 6289, 57, 33, 258, 4924, 2105, 165, 2105, 135, 2105, 300, 34, 33, 204, 19, 14, 6018, 9, 130, 31, 22, 79, 749, 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...
Hook jQuery validation message changes === I want to display my jQuery validation messages in a tooltip. In order to accomplish this, I started out by adding the following CSS rules to my stylesheet: fieldset .field-validation-error { display: none; } fieldset .field-validation-error.tooltip-icon { background-image: url('/content/images/icons.png'); background-position: -32px -192px; width: 16px; height: 16px; display: inline-block; } and a very small piece of JS code: ; (function ($) { $(function() { var fields = $("fieldset .field-validation-valid, fieldset .field-validation-error"); fields.each(function() { var self = $(this); self.addClass("tooltip-icon"); self.attr("rel", "tooltip"); self.attr("title", self.text()); self.text(""); self.tooltip(); }); }); })(jQuery); The issue is that I now need to capture any event when the validation message changes, I've been looking at the source for `jquery.validate.unobtrusive.js`, and the method I'd need to hook to is the `function onError(error, inputElement)` method. My tooltip plugin works as long as I've an updated `title` attribute, the issue comes when the field is revalidated, and the validation message is regenerated, I would need to hook into that and prevent the message from being put out there and place it in the `title` attribute instead. I want to figure out a way to do this *without modifying* the actual `jquery.validate.unobtrusive.js` file. On a second note, how could I improve this in order to leave the functionality unaltered in case javascript is disabled?
0
[ 2, 5559, 487, 8190, 93, 27999, 2802, 1693, 800, 3726, 3726, 31, 259, 20, 3042, 51, 487, 8190, 93, 27999, 7561, 19, 21, 5607, 10169, 9, 19, 389, 20, 14570, 48, 15, 31, 373, 70, 34, 4721, 14, 249, 272, 18, 18, 1761, 20, 51, 1034...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Graph API retrieving friends' images === I'm trying to get all the ids of all my friends along with their profile image. I'm using https://graph.facebook.com/me/friends?fields=picture&access_token=[myToken] I'm getting this returned: `{ "data": [ { "id": "xxx", "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/xxx_q.jpg" }` .... The picture url that returns is for a really small image. How can I get a larger image? Thanks in advance.
0
[ 2, 9090, 7210, 21, 2159, 13, 6239, 3272, 8397, 954, 22, 3502, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 65, 14, 13, 9178, 16, 65, 51, 954, 303, 29, 66, 5296, 1961, 9, 31, 22, 79, 568, 7775, 18, 6903, 9614, 9, 6413, 5199, 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...
Cursor giving null pointer exception android with preloaded database === This is the class Db.java package calc.three; import java.io.IOException; import android.app.Activity; import android.app.ListActivity; import android.content.ContentValues; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.database.Cursor; import android.database.SQLException; import android.os.Bundle; import android.view.View; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import android.widget.TextView; import android.widget.Toast; import android.database.sqlite.SQLiteDatabase; import android.widget.AdapterView; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class Db extends ListActivity { private SQLiteDatabase newDb; DataBaseHelper myDbHelper = new DataBaseHelper(this); public ListAdapter adapter; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); openDatabase(); Cursor c = newDb.rawQuery("SELECT _id, organisation FROM shoplist", null); adapter = new SimpleCursorAdapter(this, R.layout.main, c, new String[] { "organisation" }, new int[] { android.R.id.list }); setListAdapter(adapter); //inserttodata(); myDbHelper.close(); } private long inserttodata() { // TODO Auto-generated method stub ContentValues cv = new ContentValues(); cv.put("id", "112"); cv.put("organisation","test" ); return newDb.insert("shoplist", null, cv); } private void openDatabase() { try { myDbHelper.createDataBase(); } catch (IOException ioe) { throw new Error("Unable to create database"); } try { myDbHelper.openDataBase(); } catch (SQLException sqle) { System.out.println("failed to open"); throw sqle; } //String[] columns= new String[]{"_id", "Organisation"}; //cursor = newDb.query("Shop", columns, null, null, null, null, null); } } This the DataBaseHelper class package calc.three; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import android.content.Context; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; public class DataBaseHelper extends SQLiteOpenHelper{ //The Android's default system path of your application database. private static String DB_PATH = "/data/data/calc.three/databases/"; private static String DB_NAME = "charity.db"; private SQLiteDatabase myDataBase; private final Context myContext; /** * Constructor * Takes and keeps a reference of the passed context in order to access to the application assets and resources. * @param context */ public DataBaseHelper(Context context) { super(context, DB_NAME, null, 1); this.myContext = context; } /** * Creates a empty database on the system and rewrites it with your own database. * */ public void createDataBase() throws IOException{ boolean dbExist = checkDataBase(); if(dbExist){ //do nothing - database already exist }else{ //By calling this method and empty database will be created into the default system path //of your application so we are gonna be able to overwrite that database with our database. this.getReadableDatabase(); try { copyDataBase(); } catch (IOException e) { throw new Error("Error copying database"); } } } /** * Check if the database already exist to avoid re-copying the file each time you open the application. * @return true if it exists, false if it doesn't */ private boolean checkDataBase(){ SQLiteDatabase checkDB = null; try{ String myPath = DB_PATH + DB_NAME; checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); }catch(SQLiteException e){ //database does't exist yet. } if(checkDB != null){ checkDB.close(); } return checkDB != null ? true : false; } /** * Copies your database from your local assets-folder to the just created empty database in the * system folder, from where it can be accessed and handled. * This is done by transfering bytestream. * */ private void copyDataBase() throws IOException{ //Open your local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[2048]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); } public void openDataBase() throws SQLException{ //Open the database String myPath = DB_PATH + DB_NAME; SQLiteDatabase.CursorFactory c = null; myDataBase = SQLiteDatabase.openDatabase(myPath, c , SQLiteDatabase.OPEN_READWRITE); } @Override public synchronized void close() { if(myDataBase != null) myDataBase.close(); super.close(); } @Override public void onCreate(SQLiteDatabase db) { } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } // Add your public helper methods to access and get content from the database. // You could return cursors by doing "return myDataBase.query(....)" so it'd be easy // to you to create adapters for your views. } The XMl layout <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="match_parent" android:orientation="vertical" > <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="3dip" > </ListView> </LinearLayout> I am not trying to do much here. I shipped a .db file in the assets folder coppying it which happens successfully...after the copy is created, i opened the .db file from data/data/calc.three/database in the sqlite browser and i have the table there. but i cant seem to run the application it force closes and gives me a nullPointerException at the line where a pass a rawQuery to the Cursor i run the program without that line and there is no error but i cant display the data in the list view . Please help i have been stuck on this one for past 3 days. Thank You
0
[ 2, 29588, 1438, 16203, 454, 106, 5391, 13005, 29, 782, 22546, 6018, 800, 3726, 3726, 48, 25, 14, 718, 13, 9007, 9, 1004, 1385, 6030, 13, 16304, 9, 5642, 73, 9010, 8247, 9, 1963, 9, 1963, 10066, 872, 73, 9010, 13005, 9, 7753, 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...
jquery - toggling a div height based on current height vs. limit === jsfiddle is here: http://jsfiddle.net/M86nA/ code is this: $('div.wrap').click(function(){ var $minY = $('div.imgur-wrap').height(); if ($minY = 280) { $('div.wrap').animate({height: 500}); }else{ $('div.wrap').animate({height: 280}); } });​ i imagine it's because it does have the new height (500) when executing the if? how can i do this? Thanks!
0
[ 2, 487, 8190, 93, 13, 8, 20, 4572, 802, 21, 13, 12916, 2947, 432, 27, 866, 2947, 4611, 9, 4496, 800, 3726, 3726, 487, 18, 1707, 12312, 25, 235, 45, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 79, 3274, 325, 118, 1797, 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...
C# Deserialize recursive class === I would like to have my data stored in an XML like this: <MyType name="A"> <MyType name="B" /> <MyType name="E" /> <MyType name="C"> <MyType name="D"> <MyType name="G"> </MyType> </MyType> MyType should be a class that contains an array of other MyType instances. Is it possible to deserialize a class like this (with System.Xml.Serialization.XmlSerializer) or do I have to load it with my own parser? Also, is it possible to deserialize from an xml with custom header, ie. <mytypelist version="1.0">" instead of <xml version="1.0"> ? TY for answers.
0
[ 2, 272, 5910, 1746, 106, 2815, 2952, 302, 24244, 718, 800, 3726, 3726, 31, 83, 101, 20, 57, 51, 1054, 8214, 19, 40, 23504, 101, 48, 45, 13, 1, 915, 4474, 204, 3726, 7, 58, 7, 1, 13, 1, 915, 4474, 204, 3726, 7, 220, 7, 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...
Multiselect two-column transfer widget with Twitter bootstrap theme === I am looking for a multi-select jquery based two-column transfer widget having a look and feel compatible with twitter bootstrap. Typically transfer select widgets have two adjacent columns where the user moves his selections from one column to the other in both directions. I've searched really hard but couldn't find anything remotely close to my needs. Can anybody suggest something (short of writing one from scratch). Thanks.
0
[ 2, 1889, 18, 16964, 81, 8, 716, 4404, 103, 2617, 4807, 43, 3060, 29, 10623, 5894, 16514, 3184, 800, 3726, 3726, 31, 589, 699, 26, 21, 1889, 8, 18, 16964, 487, 8190, 93, 432, 81, 8, 716, 4404, 103, 2617, 4807, 43, 3060, 452, 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...
Displaying UIViewController, NSOperationQueue === I have been on an iOS 5 app in which I have an NSOperationQueue which works fine to get some data and create a UIViewController. However, at one point when every operation seems to be complete the app is unresponsive for quite a long time. Here's how it goes: 1. Get some data from DB 2. Queue - For each item Init a custom UIViewController object. 3. Hand each UIViewController object over to the MainViewController and display them. Everything goes fine until the UIVC objects have to appear. It goes past all the [[self view] addSubview:object.view]; and to the end of the function. But then there is a huge lag, from 5 to 30 seconds before the NSLog statements inside the viewDidApear of the UIVC object show up... So in code: //MainViewController -(void)displayNewView { [[self view] addSubview:object.view]; NSLog(@"Done setup"); } //-- Long unresponsiveness --// //UIVC object -(void)viewDidAppear:(BOOL)animated { NSLog(@"Start appear"); [super viewDidAppear:animated]; } What could be causing this? Am I missing something obvious? Thanks for the help!
0
[ 2, 17418, 13, 5661, 4725, 12898, 1252, 15, 13, 2172, 11377, 2005, 4185, 800, 3726, 3726, 31, 57, 74, 27, 40, 13, 7760, 331, 4865, 19, 56, 31, 57, 40, 13, 2172, 11377, 2005, 4185, 56, 693, 1123, 20, 164, 109, 1054, 17, 1600, 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...
Batch Script loop to check for multiple paremeters === Ok, i keep playing with this but can't get it to run the command for each parameters. Batch file run as test.bat /r /a /c Full Batch Code @echo on SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION :checkloop set argtoken=1 FOR /F "Tokens=* delims=" %%G IN ("%*") DO (call :argcheck %%G) pause GOTO:END :argcheck if /i "%1"=="/r" set windows=1 if /i "%1"=="/a" set active=1 goto:eof :end "%*" Displays all of the arguments such as /r /a /c But for some reason no matter what i try, i cant get the for loop to break up different parameter and run ":argcheck" for each parameter.
0
[ 2, 13064, 3884, 5293, 20, 2631, 26, 1886, 21367, 7307, 18, 800, 3726, 3726, 5854, 15, 31, 643, 791, 29, 48, 47, 92, 22, 38, 164, 32, 20, 485, 14, 1202, 26, 206, 12905, 9, 13064, 3893, 485, 28, 1289, 9, 4900, 13, 118, 139, 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...
Adding image into a div using the link rel attribute for a lightbox === I need some jQuery assistance. I'm using https://github.com/jbutz/bootstrap-lightbox for my lightbox, basically what I want to do is use what's inside the rel element to add and <img> to the lightbox div. <ul class="photo"> <li> <a href="#demoLightbox" class="image" data-toggle="lightbox" rel="/image/photo1.jpg"> <img src="/image/photo1_thumb.jpg"> </a> </li> <li> <a href="#demoLightbox" class="image" data-toggle="lightbox" rel="/image/photo2.jpg"> <img src="/image//photo2_thumb.jpg"> </a> </li> </ul> <div class="lightbox fade" id="demoLightbox"> <div class='lightbox-content'> # Javascript will insert image src <img> depending on which link is click </div> </div> From the Javascript file, I added the following code in the bootstrap lightbox.js data api $('.lightbox-content').html('<img src="' + $(this).attr("rel") + '"/>'); So it looks like this /* LIGHTBOX DATA-API * ============== */ $(function () { $('body').on('click.lightbox.data-api', '[data-toggle="lightbox"]', function ( e ) { var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 , option = $target.data('lightbox') ? 'toggle' : $.extend({}, $target.data(), $this.data()) e.preventDefault() $target.lightbox(option); $('.lightbox-content').html('<img src="' + $(this).attr("rel") + '"/>'); }) }) I'm not use if I'm doing this correct, it is adding the image tag inside the .lightbox-content class but unfortunately, when I click on an image it loads but the image and lightbox div frame isn't centered. I'm presuming it's not accepting the width and height values from the image. Any insights is much appreciated. Thanks so much.
0
[ 2, 4721, 1961, 77, 21, 13, 12916, 568, 14, 3508, 13, 7256, 35, 14755, 26, 21, 471, 5309, 800, 3726, 3726, 31, 376, 109, 487, 8190, 93, 4067, 9, 31, 22, 79, 568, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 728, 811, 380, 118, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can anyone recommend a good HTML5 jQuery file uploader plugin? === I'm not interested in the drag and drop, neither the multiple file upload. Just simply the fact you can upload a file via AJAX. I have a heavy weight template that I do not want to mess with as it is very nice as it is. I have tried the whole iframe thing and to add all the styes in the related page is such a pain to get the right design back on track. ![Here's what it looks like][1] [1]: http://i.stack.imgur.com/gE5mM.png The 'delete avatar' works perfectly as that's just a simple post form through AJAX/jQuery but when a user selects the file, I want it so it automatically uploads the file (not bothered about a loader, just an spinner would do in the avatar preview) via the change event. Everything is set up through very easy jQuery events so I want to completely customise the plugin, without any styles (which I find a lot of plugins do). I have been thinking about writing it myself without any plugin but feel this will just save some time. If anyone has done this before, any help or links would be great to try and get towards an image that can be uploaded without the page refreshing, the use of Flash or iframes.
0
[ 2, 92, 1276, 12360, 21, 254, 13, 15895, 264, 487, 8190, 93, 3893, 71, 8294, 106, 10922, 108, 60, 800, 3726, 3726, 31, 22, 79, 52, 3158, 19, 14, 5501, 17, 2804, 15, 3028, 14, 1886, 3893, 71, 8294, 9, 114, 1659, 14, 837, 42, 92,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ImportError: cannot import name splitgophertype - python === So Im using Python for the first time and have ran into an error that Google is not doing a good job in helping me figure out. Im running OSX Lion 10.7.4, Python 2.7.3, and have the xCode command line tool installed. I cant seem to get any packages to install. and keep getting the following error: distribute-0.6.26 user$ python setup.py install --prefix=~/.local Before install bootstrap. Scanning installed packages No setuptools distribution found running install Traceback (most recent call last): File "setup.py", line 214, in <module> scripts = scripts, File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Users/user/distribute-0.6.26/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/Users/user/distribute-0.6.26/setuptools/command/install.py", line 82, in do_egg_install easy_install = self.distribution.get_command_class('easy_install') File "/Users/user/distribute-0.6.26/setuptools/dist.py", line 362, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/Users/user/distribute-0.6.26/pkg_resources.py", line 1993, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/Users/user/distribute-0.6.26/setuptools/command/easy_install.py", line 26, in <module> from setuptools.package_index import PackageIndex File "/Users/user/distribute-0.6.26/setuptools/package_index.py", line 2, in <module> import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO File "build/bdist.macosx-10.7-intel/egg/urllib2.py", line 110, in <module> ImportError: cannot import name splitgophertype I dont mind reinstalling Python but I dont know the best way to accomplish that on OSX. Ive tried installing pip so that I can uninstall urllib2 but I cant get it to install. Does anyone have any ideas? Thanks -J
0
[ 2, 9010, 29992, 45, 1967, 9010, 204, 2132, 839, 15256, 4474, 13, 8, 20059, 800, 3726, 3726, 86, 797, 568, 20059, 26, 14, 64, 85, 17, 57, 717, 77, 40, 7019, 30, 8144, 25, 52, 845, 21, 254, 1205, 19, 3713, 55, 1465, 70, 9, 797, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to convert the Char * to hexadecimal value === I have a char array that i need to convert to hexadecimal value char* arrrr =[self mountLVparams:NULL :c :code_ward_arr]; int size =strlen(arrrr); I am trying with this but this not happening NSData* data = [NSData dataWithBytes:arrrr length:sizeof(sizeof(unsigned char)*size)];
0
[ 2, 184, 20, 8406, 14, 4892, 1637, 20, 24, 6791, 9522, 49, 3482, 1923, 800, 3726, 3726, 31, 57, 21, 4892, 7718, 30, 31, 376, 20, 8406, 20, 24, 6791, 9522, 49, 3482, 1923, 4892, 2483, 13, 20870, 5932, 800, 2558, 8411, 2149, 8916, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javabeans convention for one field for different types? === Can I have one `setSource()` setter with two versions for two different argument types, i.e. `setSource(InputStream)` and `setSource(TargetDataLine)`? Internally I hold the value in `Object` field and dispatch processing based on RTTI, but I wonder if bean-realted libraries like Spring will accept such setters gracefully? I.e. will I able to put values of different types into one `source` bean field?
0
[ 2, 8247, 863, 5950, 3087, 26, 53, 575, 26, 421, 2551, 60, 800, 3726, 3726, 92, 31, 57, 53, 13, 1, 3554, 12097, 5, 6, 1, 309, 815, 29, 81, 3281, 26, 81, 421, 5476, 2551, 15, 31, 9, 62, 9, 13, 1, 3554, 12097, 5, 108, 4881, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Docking a window over another window child control === Is it possible in WinForms application to dock/undock a window in another window child control? E.g. there is a main window having `TableLayoutPanel` child control. From the main window it is possible to create another window: void CreateWindow() { TheWindow window = new TheWindow(); window.Show(); } How to dock/undock it inside one of the cells of the `TableLayoutPanel`?
0
[ 2, 6120, 68, 21, 1463, 84, 226, 1463, 850, 569, 800, 3726, 3726, 25, 32, 938, 19, 628, 4190, 18, 3010, 20, 6120, 118, 1020, 11458, 21, 1463, 19, 226, 1463, 850, 569, 60, 13, 62, 9, 263, 9, 80, 25, 21, 407, 1463, 452, 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...
CDN Preferences Microsoft vs Google === Most of our clients are EU based and we've recently being having issues loading from googles cdn's from our offices. So we swapped to using the Microsoft CDN for javascripts. It loads nicer here but was wondering if people could share their experiences with both, and which one they think would be better for EU clients with a few reasons? So far googles only been able to serve me with this result as any hint, but I'd like some more opinions please. Many thanks http://royal.pingdom.com/2010/05/11/cdn-performance-downloading-jquery-from-google-microsoft-and-edgecast-cdns/
4
[ 2, 1745, 103, 9808, 18, 7099, 4611, 8144, 800, 3726, 3726, 127, 16, 318, 7421, 50, 2898, 432, 17, 95, 22, 195, 1989, 142, 452, 1549, 12797, 37, 8144, 18, 1745, 103, 22, 18, 37, 318, 3642, 9, 86, 95, 29225, 20, 568, 14, 7099, 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...
Runtime exec issues in Linux === In an application I am writing, I am launching another application (a runnable JAR) using Runtime.exec(...). Everything launches successfully in Windows, but Linux (specifically certain installations of CentOS - works in Ubuntu) has been giving me some problems. For some reason, the only way the secondary application will successfully launch is if I execute the first through a terminal. All behavior works as expected. However, if I launch the first application by double-clicking its icon (without a terminal open), the button to launch the second application seems to do nothing. I get no exceptions or error output - just a flash of my progress bar saying that it is launching, and then nothing. I can confirm through jconsole that the second application's process is never launched. I have seen the commonly linked article on the pitfalls of the exec method ( http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html ), but have not been able to solve this problem with anything I have found there. I am in fact reading the output and error streams of the second process, as I see all output when it successfully runs (after launching the first application through a terminal command). Not knowing a lot about deeper workings of Linux, I think this sounds like it may be a permissions issue with the output stream or something, but I am not sure. In case it helps to diagnose the problem, I am using the command: `rt.exec(new String[]{"\bin\bash", "-c", "java -jar myjarfile.jar myArg1 myArg2 ..."});` Since this works (depending on how the application is launched), I'm not too concerned that anything is wrong with this piece of code... Anyone have any suggestions? Thanks in advance!
0
[ 2, 485, 891, 1396, 3319, 1549, 19, 13024, 800, 3726, 3726, 19, 40, 3010, 31, 589, 1174, 15, 31, 589, 13762, 226, 3010, 13, 5, 58, 485, 103, 579, 5112, 6, 568, 485, 891, 9, 1706, 3319, 5, 9, 9, 9, 6, 9, 796, 22933, 3673, 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...
Loop or function for sequence of matrices of sst data === I have been looking for a way to select the frequency of values within a range in R from a sequence of matrices of sea surface temperature (sst). These data are arranged as (sst, 80*40*172) i.e., (sst, longitude,latitude, month) for the north Atlantic. I'am interested in those frequencies because I use them to calculate the surface area of a range in sst for every month say between 4°C and 12°C. I have used R frequently for statistical analyses of time-series and spatial data, but I'am not used to programming so my approach is probably not the most efficient. I have succeeded in extracting frequencies for sst values of say >12 °C for a all latitudes in one month: My data from IRI/LDEO climate research web site `dat <- read.table("c:/Temp/[Y+X]datatable.tsv", header=FALSE, sep="\t")` A 5x5 sample matrix of the first month `Nov 1981 30.5000 31.5000 32.5000 33.5000 9.50000 21.7906 21.9431 22.1324 22.1662 8.50000 21.7267 21.8573 21.9981 21.8757 7.50000 21.6644 21.7781 21.8960 21.7393 6.50000 21.5989 21.7025 21.8044 21.6304` I basically skip the longitude, row labels I also intend to add the date latter. First I extract the first month as a matrix (t) and apply two custom functions surface area of lat strip SA and surface area of all lat strips for the month MSA. `ro=2:81` `co=2:41` `t <- as.matrix(dat[ro,co])` `SA <- function (lat,tmu){ l <- c(t[,lat]>=tmu,0) la <- as.data.frame(l) x <- la[,1] n <- length(x) sau <- array(0,n) x. <- 30 for (i in 1:n) sau[i] <- (x[i]*111.320)*(cos(x.*(3.1415/180))*111.320) s <- as.matrix(sum(sau)) } MSA <- function(tmu){ m <-1:40 su <- array(0,0) for (i in 1:40) su[i] <-SA(m[i],tmu) ms <- as.data.frame(su) sa <- as.data.frame(colSums (ms)) return(sa) }` Matrix (sau) has the surface area of sst> tmu(say 12 °C) for latitude(lat)(say at 30°N) Matrix (sa) has the sums of all the latitudes (from 30°N to 70°N).This does the job for one month and I can repeat the functions 12 times to obtain the year or 172 times for the 16 years this way: `lat= 30.5` Starting latitude `st=81` Step of 81 longitude cells to extract next month `t=12` Desired temperature `SA1 <- { i=0*st t <- as.matrix(dat[ro+i,co]) SA(lat,t) MSA(12) }` `SA2 <- { i=1*st t <- as.matrix(dat[ro+i,co]) SA(30.5,t) MSA(12) }` My question is if possible to create a loop or a function that would iterate through all months 172 times and so skip repeating SA1,SA2...SA172. Thanks in advance.
0
[ 2, 5293, 54, 1990, 26, 4030, 16, 24849, 16, 13, 18, 384, 1054, 800, 3726, 3726, 31, 57, 74, 699, 26, 21, 161, 20, 5407, 14, 5328, 16, 4070, 363, 21, 978, 19, 761, 37, 21, 4030, 16, 24849, 16, 598, 1490, 3348, 13, 5, 18, 384,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Regular Expression to detect query in java === I am trying to search a String using Regular Expression. For example: this is my sample String **if (c == 0) { count = 0; du.insert(ipAddress, c); } else { count = c; } getDate(); String query1 = "select * from loginmaster where username = '" + username + "' and password = '" + password + "' ;"; //out.println(query1); //out.println(request.getParameter("Group1")); session.setAttribute("group", request.getParameter("Group1")); if (count < 3) { if (request.getParameter("Group1").equals("With")) { LoginQuery q = new LoginQuery(); checked = q.Checker(query1); if (checked == false) { connection.getConnection(); connection.getDML("insert into attack values('"+ipAddress+"','"+date+"','Attack Detected')"); } }** and i am trying to find querys in this String using Regular Expression String regExp = "\b(ALTER|CREATE|DELETE|DROP|EXEC(UTE){0,1}|INSERT( +INTO){0,1}|MERGE|SELECT|UPDATE|UNION( +ALL){0,1})\b"; and String regExp = "(;|\\s)(exec|execute|select|insert|update|delete|create|alter|drop|rename|truncate|backup|restore)\\s"; But i am not getting any Output nor Error. Remaining Code is: Pattern p = Pattern.compile(regExp, Pattern.CASE_INSENSITIVE); while ((line = reader.readLine()) != null) { Matcher m = p.matcher(line); if (m.matches()) { JOptionPane.showMessageDialog(this, "innnnnnnnnnn"); System.err.println(m.group(1)); } } Pls help
0
[ 2, 1290, 1803, 20, 9092, 25597, 19, 8247, 800, 3726, 3726, 31, 589, 749, 20, 2122, 21, 3724, 568, 1290, 1803, 9, 26, 823, 45, 48, 25, 51, 5717, 3724, 13, 1409, 821, 13, 5, 150, 800, 3726, 713, 6, 13, 1, 2468, 800, 713, 73, 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...
Adding facebook/twitter login option to website users === Users details are held in database table called user where I have fields username and password among others. Now, I need to give users additional option to login using facebook and twitter. I know how to handle these authentications but what I can't think is - How to identify which FB user account relates to which local user account? How do I do this? I'm not looking for code but the process. The process in my mind is somewhat as below - User logs in using username and password of my website. then they can add FB or Twitter as external authentication and when they do it I ask them to login to FB. On successful FB login I save some unique fb id (i don't know which as haven't checked yet) in the users table. Next time they can just login using FB as I'd be able to identify which local record they belong to. Is this how you would do this? What would you suggest? Thanks for your inputs in advance. PS - I'll be adding multiple networks (like linkedin and others) but at the moment fb and twitter only.
0
[ 2, 4721, 9090, 118, 38, 13098, 106, 6738, 108, 4255, 20, 2271, 3878, 800, 3726, 3726, 3878, 3289, 50, 269, 19, 6018, 859, 227, 4155, 113, 31, 57, 2861, 4155, 7259, 17, 20884, 497, 654, 9, 130, 15, 31, 376, 20, 590, 3878, 1351, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Xtext auto-suggest value === I am working on Xtext project. I need feature for my variable declaration. Assume I am using my DSL like one below LifeEra:Teenage Age:(while cursor is here) I wonder if I can get pop-up down here and suggesting 16 since LifeEra entered Teenage. Is there anyway I may achieve that. Hope my question is clear. Thank you.
0
[ 2, 993, 11969, 3108, 8, 18, 21606, 1430, 1923, 800, 3726, 3726, 31, 589, 638, 27, 993, 11969, 669, 9, 31, 376, 1580, 26, 51, 7612, 7098, 9, 7158, 31, 589, 568, 51, 13, 43, 18, 255, 101, 53, 1021, 201, 2615, 45, 11256, 1303, 34...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to read the contents of a zipped URL using php === I am using php for one of my projects. I have a URl which has the set of XML of a specific site. The URL is in the format www.sitefeed.com/somekey&&gZipCompress=yes. I want to read the contents of this file with out downloading it into my server. I tried compress.zlib: in front of the URL but it returned an empty array. Thanks
0
[ 2, 184, 20, 1302, 14, 8478, 16, 21, 28693, 287, 6362, 568, 13, 26120, 800, 3726, 3726, 31, 589, 568, 13, 26120, 26, 53, 16, 51, 2314, 9, 31, 57, 21, 287, 6362, 56, 63, 14, 309, 16, 23504, 16, 21, 1903, 689, 9, 14, 287, 6362,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 UI datepicker: onSelect called twice === I noticed a strange behavior with the jQuery datepicker onSelect method, you can take a look at [this fiddle][1] to test it. Tested with jQuery 1.7.2 and jQuery UI 1.8.18, happens in Firefox, IE and Chrome. Scenario: 1. put the focus on the text field (the datepicker should appear) 2. press enter to select the default date (as [the datepicker API][2] says it can be done) 3. notice that onSelect is called twice. Everything works fine if you select the date with the mouse. Is this a bug? If not, how can I avoid this behaviour? Thanks for your help. [1]: http://jsfiddle.net/w8Pvp/3/ [2]: http://docs.jquery.com/UI/Datepicker
0
[ 2, 487, 8190, 93, 13, 5661, 1231, 16855, 106, 45, 27, 18, 16964, 227, 2088, 800, 3726, 3726, 31, 2711, 21, 2578, 3257, 29, 14, 487, 8190, 93, 1231, 16855, 106, 27, 18, 16964, 2109, 15, 42, 92, 247, 21, 361, 35, 636, 1565, 12759,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails - id not getting passed from dropdown to link === What I'm trying to achieve is to have a list of projects in a dropdown menu, so that when one is selected from that dropdown, only tasks etc relevant to that project are shown on other pages. I got it working fine by having the button in that project's show view, but it would be a lot quicker if the user could select it this way round. The below code shows what I've got so far in the index view (thanks to cutalion as well!) - the line that seems to be the problem is the third one - the select link. The error it's giving is that it can't find a project without an id. There is a project listed in the dropdown when the page displays (when I remove that line) - so why is the id not getting passed? Additionally, when the third line is removed from the code to get the page to display, the link generated by the second line points to the index view rather than the show view. I'm guessing this is all to do with the id not getting passed, but I have no clue how to fix it! Any light anyone could shed on this would be great, thanks! projects/index view: <%= collection_select(:project, :id, Project.all, :id, :name) %> <%= link_to "Show", @project, id: "show_project_btn" %> <%= link_to "Select" select_project_project_path(@project), id: "select_project_btn" %> <script type="javascript"> $('#project_id').change(function(){ var project_id = $(this).val(); $('#show_project_button').attr('href', '/project/' + project_id); $('#select_project_button').attr('href', '/projects/' + project_id + '/select_project'); }) </script> Also, the select_project action in the projects controller: def select_project project = Project.find(params[:id]) session[:project_id] = project.id redirect_to root_url, notice: "Current project set to: #{project.name}, ID: #{project.id}" end
0
[ 2, 2240, 18, 13, 8, 4924, 52, 1017, 1100, 37, 2804, 2968, 20, 3508, 800, 3726, 3726, 98, 31, 22, 79, 749, 20, 4689, 25, 20, 57, 21, 968, 16, 2314, 19, 21, 2804, 2968, 11379, 15, 86, 30, 76, 53, 25, 1704, 37, 30, 2804, 2968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 speed up Selenium/Junit test execution by avoiding the registry settings === we have 500+ test cases for our application. Test cases are running for 4 to 6 hours based on the CPU and RAM overhead. For each test case Selenium will start and stop the IE. IE takes the backup of the registry for each test case. I am seeing the following statements for each test case and 14:43:38,312 INFO [org.openqa.selenium.server.browserlaunchers.WindowsProxyManager] Backing up registry settings... 14:43:40,234 INFO [org.openqa.selenium.server.browserlaunchers.WindowsProxyManager] Modifying registry settings... There is 2 minutes time difference between above two statements. Can we bypass the backup of the registry and run the test cases. In this way my test cases will finish less than 20min to current build.
0
[ 2, 184, 20, 1362, 71, 23027, 14311, 118, 8753, 242, 1289, 5769, 34, 10298, 14, 18269, 12410, 800, 3726, 3726, 95, 57, 3033, 2430, 1289, 1871, 26, 318, 3010, 9, 1289, 1871, 50, 946, 26, 268, 20, 400, 974, 432, 27, 14, 17578, 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...
JqGrid navigation button function === Sorry for the noob question..but how to implement this --> <http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing> how to put textbox and label?..and save it to the database..I'm using MVC3..thanks!
0
[ 2, 487, 1251, 16375, 8368, 5167, 1990, 800, 3726, 3726, 1875, 26, 14, 90, 4995, 1301, 9, 9, 811, 184, 20, 8713, 48, 13, 8, 8, 1, 13, 1, 21127, 6903, 6483, 9, 3367, 16393, 9, 960, 118, 728, 1251, 16375, 17375, 118, 43, 9266, 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...
Quickest way to sort this array === I am trying to figure out the quickest way to sort this array (i.e. performance wise). I want to sort this alphabetically by the first key in each array... $results = array(array('foo', '=', '1'), array('dog', '!=', '5'), array('apple', '<', '4')); After the sort shoud look like... $results = array(array('apple', '<', '4'), array('dog', '!=', '5'), array('foo', '=', '1')); Any ideas?
0
[ 2, 2231, 1430, 161, 20, 2058, 48, 7718, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 14, 2231, 1430, 161, 20, 2058, 48, 7718, 13, 5, 49, 9, 62, 9, 956, 6714, 6, 9, 31, 259, 20, 2058, 48, 27169, 102, 34, 14, 64, 1246, 19, 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...
Hide only text in html paragraph === i want to hide text in paragraph,but there are one image and some text on it ..when i am using css to display none so all paragraph are hidden...but i want to only hide the text not image. here is the code <p><img src="/images/blog/Southland Life Education Trust Car 2.jpg" alt="">Two years ago the Southland Life Education Community Trust approached our four Southland Provincials, asking for assistance to replace their educator’s car, as the current one needed major repairs.</p>
0
[ 2, 3077, 104, 1854, 19, 13, 15895, 20599, 800, 3726, 3726, 31, 259, 20, 3077, 1854, 19, 20599, 15, 811, 80, 50, 53, 1961, 17, 109, 1854, 27, 32, 13, 9, 9, 3185, 31, 589, 568, 272, 18, 18, 20, 3042, 2369, 86, 65, 20599, 50, 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...
Want to create EPUBReader === I am new in android. I have seen many pdf reader for android. Now I want to create a EPUBReader by Myself. I downloaded the epublibrary but still not getting that how to do that. Every help will be appreciated. Thanks
0
[ 2, 259, 20, 1600, 2579, 291, 22852, 106, 800, 3726, 3726, 31, 589, 78, 19, 13005, 9, 31, 57, 541, 151, 13, 11124, 7765, 26, 13005, 9, 130, 31, 259, 20, 1600, 21, 2579, 291, 22852, 106, 34, 992, 9, 31, 23887, 14, 2579, 4502, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Looping through JSON result of AjaxControlToolkit.CascadingDropDownNameValue object === My webservice returns objects formatted based on the asp.net AjaxControlToolkit.CascadingDropDownNameValue object. How do I loop through this JSON result and select the value of property "name"? So: Drenthe, Flevoland, Friesland etc [{"isDefaultValue":false,"name":"Drenthe","optionTitle":null,"value":"1"},{"isDefaultValue":false,"name":"Flevoland","optionTitle":null,"value":"16"},{"isDefaultValue":false,"name":"Friesland","optionTitle":null,"value":"2"}]
0
[ 2, 5293, 68, 120, 487, 528, 829, 16, 20624, 12898, 20799, 13703, 9, 5949, 13489, 68, 12361, 2968, 7259, 15165, 3095, 800, 3726, 3726, 51, 2741, 11449, 4815, 3916, 13, 29850, 432, 27, 14, 28, 306, 9, 2328, 20624, 12898, 20799, 13703, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Aspxgridview : How to change the header caption width so it will fits the columns width? === I have the following problem: on runtime I am changing the name of the columns caption (the grid is linked to a table and I don't want the user to see their original name). However I have one header caption which is too long - "Total Number of votes" which actually represents an integer not bigger than 4 digits. My question is how I can fix the header caption width ... in my case I want it to appear on two lines?
0
[ 2, 28, 306, 396, 16375, 4725, 13, 45, 184, 20, 753, 14, 157, 106, 26622, 9456, 86, 32, 129, 2742, 18, 14, 7498, 9456, 60, 800, 3726, 3726, 31, 57, 14, 249, 1448, 45, 27, 485, 891, 31, 589, 4226, 14, 204, 16, 14, 7498, 26622, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calculating speed and distance from a set of GPS points === I'm trying to solve a weird problem. Maybe you guys know of some algorithm that takes care of this. I have data for a cargo freight truck and want to extract some data. Suppose I've got a list of sorted points that I get from the GPS. That's the route for that truck: [ { "lng": "-111.5373066", "lat": "40.7231711", "time": "1970-01-01T00:00:04Z", "elev": "1942.1789265256325" }, { "lng": "-111.5372056", "lat": "40.7228762", "time": "1970-01-01T00:00:07Z", "elev": "1942.109892409177" } ] Now, what I want to get is a list of the "fastest miles". I'll do an example: Given the points: A, B, C, D, E, F the distance from point A to point B is 1 mile, and the cargo took 10:32 minutes. From point B to point D i've got other mile, and the cargo took 10 minutes, etc. So, i need a list sorted by time. Similar to: B -> D: 10 A -> B: 10:32 D -> F: 11:02 Do you know any efficient algorithm that let me calculate that? Thank you all. PS: I'm using Python.
0
[ 2, 22937, 1362, 17, 1583, 37, 21, 309, 16, 18298, 819, 800, 3726, 3726, 31, 22, 79, 749, 20, 8402, 21, 5455, 1448, 9, 913, 42, 2776, 143, 16, 109, 9083, 30, 1384, 781, 16, 48, 9, 31, 57, 1054, 26, 21, 5570, 7728, 2956, 17, 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...
new to wireless networking. advice needed === I have an idea of providing mobile internet services to mobile phones an smart phones in my country through a router/access point while connected to either a wimax network or wifi. This is only an idea because I have realized that there is a big market for mobile phones/smart phones access to the internet at cheap cost, but I am deficient on the practical networking details. I have started learning linux os and decided to come to this forum to ask: what networking knowledge do I need for this sort of business? I will cherish and value any advice. I have a three year plan for going about it since I know the business has much future value since smart phone adoption is steadily increasing in Nigeria where I live and at a fast rate among the young population who need to communicate especially on social networks. Thanks.
2
[ 2, 78, 20, 10149, 16230, 9, 4978, 851, 800, 3726, 3726, 31, 57, 40, 882, 16, 2674, 3241, 2620, 687, 20, 3241, 14830, 40, 3978, 14830, 19, 51, 475, 120, 21, 858, 139, 118, 20604, 454, 133, 2587, 20, 694, 21, 4807, 8304, 982, 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...
WWW::Mechanize::Firefox wait until images are loaded === Using this Perl module, how would I wait for the page to load all the images? (I am trying to screenshot image which is part of the age) I tried `$agent->success` and this only checks if the page is loaded (doesn't check the images).
0
[ 2, 13, 6483, 45, 45, 790, 3606, 2952, 45, 45, 5929, 18219, 1760, 163, 3502, 50, 8572, 800, 3726, 3726, 568, 48, 416, 255, 12613, 15, 184, 83, 31, 1760, 26, 14, 2478, 20, 6305, 65, 14, 3502, 60, 13, 5, 49, 589, 749, 20, 2324, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
drag and drop markets and create a path on google map === good day. I want to drag 2 images to google map (begin of the way and end), and create a path on it. var begin; var end; var map; This variables for map, begin and end of the way $(document).ready(function(){ $(".draggable").draggable({ revert: "invalid" }); $(".droppable").droppable({ drop: function(event, ui) { var xPos = (event.pageX - getPos(document.getElementById("map_canvas")).x) - (event.pageX - getPos(document.getElementById(ui.draggable.attr("id"))).x); var yPos = (event.pageY - getPos(document.getElementById("map_canvas")).y) - (event.pageY - getPos(document.getElementById(ui.draggable.attr("id"))).y); if (!ui.draggable.data("originalPosition")) { ui.draggable.data("originalPosition", ui.draggable.data("draggable").originalPosition); } if(!(vertrekIsSet && aankomstIsSet)){ if(ui.draggable.attr("id") == "vertrekimg" && !vertrekIsSet){ var point = new google.maps.Point(xPos + 10,yPos + 60); var ll = overlay.getProjection().fromContainerPixelToLatLng(point); setDepartureMarker(ll); vertrekIsSet = true; document.getElementById("vertrekimg").style.display = 'none'; //document.getElementById("vertrektxt").style.display = 'none'; }else if(ui.draggable.attr("id") == "aankomstimg" && !aankomstIsSet){ var point = new google.maps.Point(xPos + 10,yPos + 60); var ll = overlay.getProjection().fromContainerPixelToLatLng(point); setAankomstMarker(ll); aankomstIsSet = true; document.getElementById("aankomstimg").style.display = 'none'; //document.getElementById("aankomsttxt").style.display = 'none'; } } }); }); this is the code of getting coordinates of the markets And this is - functions to set marcets and show a route, but nothing heppend =( function setDepartureMarker(locatie) { //vertrekMarker.setMap(null); //vertrekMarker = null; var marker = new google.maps.Marker({ position: locatie, map: map, icon: icons.departure, title: "Departure", clickable: true, draggable: true, raiseOnDrag: false }); vertrekMarker = marker; begin = vertrekMarker.getPosition(); //calcRoute(); google.maps.event.addListener(vertrekMarker, 'dragend', function(event) { vertrekMarker.setPosition(event.latLng); //calcRoute(); }); //vertrekMarker.setMap(map); } function setAankomstMarker(locatie) { //vertrekMarker.setMap(null); //vertrekMarker = null; var marker = new google.maps.Marker({ position: locatie, map: map, icon: icons.aankomst, title: "Aankomst", clickable: true, draggable: true, raiseOnDrag: false }); aankomstMarker = marker; end = aankomstMarker.getPosition(); calcRoute(begin, end); //vertrekMarker.setMap(map); } function calcRoute(begin,end){ var request = { origin: begin, destination: end, // waypoints: waypoints, travelMode: google.maps.TravelMode.WALKING //travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); //pad = response.routes[0].overview_path; var leg = response.routes[ 0 ].legs[ 0 ]; vertrekMarker.setMap(null); aankomstMarker.setMap(null); setDepartureMarker(leg.start_location); setAankomstMarker(leg.end_location); } }); }
0
[ 2, 5501, 17, 2804, 5406, 17, 1600, 21, 2013, 27, 8144, 2942, 800, 3726, 3726, 254, 208, 9, 31, 259, 20, 5501, 172, 3502, 20, 8144, 2942, 13, 5, 17143, 108, 16, 14, 161, 17, 241, 6, 15, 17, 1600, 21, 2013, 27, 32, 9, 4033, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ensure all cells have 3 digits in LaTeX representation using xtable === I have the following dataframe: > dput(py6s_pwc_16) structure(list(source = c("AERONET", "BIGF", "MODIS"), ndvi_real = c(0.618, 0.618, 0.618), ndvi_95 = c("0.616", "0.616", "0.615"), ndvi_05 = c("0.62", "0.62", "0.621"), perc_95 = c("-0.288", "-0.315", "-0.431"), perc_05 = c("0.374", "0.289", "0.471")), .Names = c("source", "ndvi_real", "ndvi_95", "ndvi_05", "perc_95", "perc_05"), row.names = c(NA, -3L), class = "data.frame") When I just print it out at the R command prompt it looks like this: > py6s_pwc_16 source ndvi_real ndvi_95 ndvi_05 perc_95 perc_05 1 AERONET 0.618 0.616 0.62 -0.288 0.374 2 BIGF 0.618 0.616 0.62 -0.315 0.289 3 MODIS 0.618 0.615 0.621 -0.431 0.471 I want to produce a LaTeX representation of this table using `xtable`. I'm trying to do this with the following code: x <- xtable(py6s_pwc_16) digits(x) <- 3 print(x, include.rownames=FALSE, table.placement=NULL, latex.environments=NULL, size="\\centering", booktabs=TRUE, sanitize.colnames.function=add_bold) However, that produces LaTeX code which looks like the following (just a snippet from inside the table): AERONET & 0.618 & 0.616 & 0.62 & -0.288 & 0.374 As you can see, the 4th column doesn't have three digits - it's just 0.62, and I'd like it to be 0.620. Is there a way to make xtable do this? I've tried adding the line: display(x) <- rep("fg", ncol(x)+1) to try and get R to use significant figures rather than digits, but that doesn't change the output. Any ideas?
0
[ 2, 4062, 65, 2934, 57, 203, 19076, 19, 456, 396, 5442, 568, 993, 5924, 800, 3726, 3726, 31, 57, 14, 249, 1054, 8361, 45, 13, 1, 13, 43, 4881, 5, 6448, 379, 18, 1, 17230, 150, 1, 1091, 6, 1411, 5, 5739, 5, 12097, 800, 272, 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...
Time lag between DrawRect completing and UI refreshing === I have an iPad app which uses an open source class MMGridView. Basically I perform a CoreData query, and then this class draws boxes on the screen in a grid pattern to represent the results. The boxes include photos. Everything works fine, except that sometimes there is an unexplained time lag until the UI is drawn on the screen. Sometimes the refresh is instant, sometimes it is over 20 seconds. It appears very random in its behaviour. I've managed to determine that: - DrawRect is being called every time. - that the lag is not occurring in the DrawRect method. - when I run the time profiler, from what I can tell, nothing is happening during this time lag My question is, what happens after DrawRect is called that I can try to look at to identify the problem? Absolutely any ideas would be greatly appreciated. I'm including the code from the DrawRect method just in case that sparks any ideas, but from what I can tell, this method completes before the lag occurs. - (void)drawRect:(CGRect)rect { if (self.dataSource && self.numberOfRows > 0 && self.numberOfColumns > 0) { NSInteger noOfCols = self.numberOfColumns; NSInteger noOfRows = self.numberOfRows; NSUInteger cellsPerPage = noOfCols * noOfRows; NSLog(@"rows = %d, cols = %d", noOfCols, noOfRows); CGRect gridBounds = self.scrollView.bounds; CGRect cellBounds = CGRectMake(0, 0, gridBounds.size.width / (float)noOfCols, gridBounds.size.height / (float)noOfRows); CGSize contentSize = CGSizeMake(self.numberOfPages * gridBounds.size.width, gridBounds.size.height); [self.scrollView setContentSize:contentSize]; for (UIView *v in self.scrollView.subviews) { [v removeFromSuperview]; } for (NSInteger i = 0; i < [self.dataSource numberOfCellsInGridView:self]; i++) { MMGridViewCell *cell = [self.dataSource gridView:self cellAtIndex:i]; [cell performSelector:@selector(setGridView:) withObject:self]; [cell performSelector:@selector(setIndex:) withObject:[NSNumber numberWithInt:i]]; NSInteger page = (int)floor((float)i / (float)cellsPerPage); NSInteger row = (int)floor((float)i / (float)noOfCols) - (page * noOfRows); CGPoint origin = CGPointMake((page * gridBounds.size.width) + ((i % noOfCols) * cellBounds.size.width), (row * cellBounds.size.height)); CGRect f = CGRectMake(origin.x, origin.y, cellBounds.size.width, cellBounds.size.height); cell.frame = CGRectInset(f, self.cellMargin, self.cellMargin); [self.scrollView addSubview:cell]; } } }
0
[ 2, 85, 13, 6828, 128, 2003, 14673, 38, 6869, 17, 13, 5661, 27134, 800, 3726, 3726, 31, 57, 40, 31, 8240, 4865, 56, 2027, 40, 368, 1267, 718, 1620, 16375, 4725, 9, 11374, 31, 2985, 21, 2884, 18768, 25597, 15, 17, 94, 48, 718, 108...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RESTEasy - how to set Representation for Proxy Class === I set up a Client Proxy class with RESTEasy: ResourceIF resource = ProxyFactory.create(resourceIF.class, PATH, clientExecutor); When I invoke ClientResponse res = (ClientResponse) resource.getObject(); for which my interface looks like this: @GET @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getObject() I get automatically a XML representation. How to set it to JSON? Is it just about declaring a new only JSON aware Interface?
0
[ 2, 760, 18385, 13, 8, 184, 20, 309, 5442, 26, 27188, 718, 800, 3726, 3726, 31, 309, 71, 21, 6819, 27188, 718, 29, 760, 18385, 45, 6577, 821, 6577, 800, 27188, 17455, 93, 9, 6037, 1373, 5, 99, 12097, 821, 9, 1898, 15, 2013, 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...
jsf richfaces progressbar === i'am using an richfaces Progressbar(Richfaces 4). I have an a4j:button which runs a long lasting function, which updates objects in the database. The problem is that the progresbar doesn't update (not even sends requests) while the ajax request of the button is still running. Any suggestions for that? Creating a thread for the long function didn't work.. the context is missing for this thread
0
[ 2, 487, 18, 410, 2042, 6413, 18, 3455, 1850, 800, 3726, 3726, 31, 22, 765, 568, 40, 2042, 6413, 18, 3455, 1850, 5, 3920, 6413, 18, 268, 6, 9, 31, 57, 40, 21, 300, 728, 45, 811, 444, 56, 1461, 21, 175, 11768, 1990, 15, 56, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Chain of Jquery Promises === I have a simple chain of events: 1. Get Columns from a metaData table (async) 2. load selected columns (async) 3. render list I used to just the chain these functions, each calling the next when it had completed. However, its not very obvious what's going (calling `getColumnsFromMeta` results in the view being populated). So in the interest of clarity and code re-use I'd like to refactor these using `JQuery` `Promises`. I have used promises before. But how do I chain more than two? `getColumnsFromMeta ().then(loadSourceFromDatabase /*some arguments*/) //.then(renderList)?;` Here's an example of the `getColumnsFromMeta`: var getColumnsFromMeta = function(id) { var sql, dfd; dfd = $.Deferred(); var onSuccess = function(tx, result) { var columns = []; for (var i = 0; i < result.rows.length; i++) { columns.push(result.rows.item(i).Column); } dfd.resolve(columns); }; var onError = function(tx, error) { dfd.reject(error); }; sql = "SELECT Column FROM Meta WHERE id = ?"; database.query(sql, [id], onSuccess, onError); return dfd.promise(); };
0
[ 2, 2858, 16, 487, 8190, 93, 12247, 800, 3726, 3726, 31, 57, 21, 1935, 2858, 16, 963, 45, 137, 9, 164, 7498, 37, 21, 28057, 859, 13, 5, 58, 9507, 150, 6, 172, 9, 6305, 1704, 7498, 13, 5, 58, 9507, 150, 6, 203, 9, 16535, 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...
How I can to pass the values lat, lng and address from jQuery function to PHP form, and save all on a table MySQL? === How I can to pass the values lat, lng and address from jQuery google maps functions (gmaps.js) to main.html ? . I want to obtain these values and with others - that I will get in the main html, I want to write all together on a table (markers) of MySQL, with a save button. //**gmaps.js function function update_ui( address, latLng ) { $('#gmaps-input-address').autocomplete("close"); $('#gmaps-input-address').val(address); $('#gmaps-output-latitude').html(latLng.lat()); $('#gmaps-output-longitude').html(latLng.lng()); $('#gmaps-output-address').html(address); } //**html main code: <div id='input'> <input type='text' id='gmaps-input-address' placeholder='to start, write address...' size="41" /> <div id='gmaps-error'> </div> </div> <div id="gmaps-canvas" style="width:auto; height:250px"></div> <p> <!—show current lat, lng and address --> Latitude: <span id='gmaps-output-latitude'></span> <br/> Longitude: <span id='gmaps-output-longitude'></span><br/> Address: <span id='gmaps-output-address'></span><br/> …… …… <!—start form. (get others values) --> <label>name<br /> <input class="text" type="text" name="name" id="name" width="100%"/> </label> <label>address<br /> <input class="text" type="text" name="address" id="precio" width="100%"/> </label> …… <!—here I need to get lat and assign to var--> <!—here I need to get lng and assign to var --> <!—here I need to get address and assign to var --> <!— each one lat, lng , address, in separate vars --> <!— call to sql to save them in a table --> <!—end of form (get others values) --> //**SQL sentence: function insertar($campos){ if($this->con->conectar()==true){ return mysql_query("INSERT INTO markers ( name, precio, lat, lng, address ) VALUES ('".$campos[0]."','".$campos[1]."','".$campos[2]."','".$campos[3]."','".$campos[4]."')"); } }
0
[ 2, 184, 31, 92, 20, 1477, 14, 4070, 14303, 15, 644, 2723, 17, 3218, 37, 487, 8190, 93, 1990, 20, 13, 26120, 505, 15, 17, 2079, 65, 27, 21, 859, 51, 18, 22402, 60, 800, 3726, 3726, 184, 31, 92, 20, 1477, 14, 4070, 14303, 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...
PHP Cronjob causing too many Database Connections === I have a EC2 Server with multiple Cronjobs which are called every minute. Most of the time everything works fine, but sometimes it happens, that one cronjob (wget) takes very long due to the database and the next wget call is made. This slows down the database and I end up with many wget calls and over 200 Database connections. Most of the time there is no other way than shutting down both the RDS and the EC2 an relaunching without the cronjobs. I was wondering: 1. What would be a better solution for cronjobs (I have to fetch a lot of data and store it in the RDS)? 2. How can I make sure, that only one wget for each URL is running? 3. Why is the RDS not closing the connections although they take multiple minutes? Which parameter do I have to change? Thank you!
0
[ 2, 13, 26120, 13, 19587, 1636, 220, 3242, 266, 151, 6018, 6760, 800, 3726, 3726, 31, 57, 21, 6695, 135, 8128, 29, 1886, 13, 19587, 1636, 4562, 56, 50, 227, 352, 2038, 9, 127, 16, 14, 85, 796, 693, 1123, 15, 47, 1030, 32, 5531, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHPRtfLite issue when using utf-8 encoded files === i'm using PHPRtfLite to generate doc files in codeigniter my files are all in utf8 encoding when i use PHPRtfLite i get file with strange sample ![enter image description here][1] ![enter image description here][2] [1]: http://i.stack.imgur.com/oGeeM.jpg [2]: http://i.stack.imgur.com/98mKE.jpg how can fix this issue this is my code <?php function create_meeting_minutes($cat_title, $meeting_info, $members, $threads) { require_once 'application/libraries/phprtflite/PHPRtfLite.php'; // require 'application/libraries/ArCharsetC.class.php'; PHPRtfLite::registerAutoloader(); //$ArCharsetC = new ArCharsetC(); //$rtf = new PHPRtfLite(); // rtf document instance $rtf = new PHPRtfLite(); // add section $sect = $rtf->addSection(); // write text $sect->writeText('Hello world!', new PHPRtfLite_Font(), new PHPRtfLite_ParFormat()); // save rtf document to hello_world.rtf $rtf->sendRtf('hello_world.rtf'); ?>
0
[ 2, 4145, 4899, 11720, 10601, 1513, 76, 568, 287, 11720, 8, 457, 13665, 6488, 800, 3726, 3726, 31, 22, 79, 568, 4145, 4899, 11720, 10601, 20, 7920, 9765, 6488, 19, 1797, 9693, 242, 106, 51, 6488, 50, 65, 19, 287, 11720, 457, 19608, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hibernate in concurrent transaction doesn`t load data commited in another transaction === In our application we have critical section of code accessed by concurrent transactions. This critical section is guarded by database lock: `SELECT FOR UPDATE`. And we came to an issue when updates commited by one transaction are not available in another queued concurrent transaction. We are using Spring 3.1, Hibernate 4.2.0 , Mysql 5. Transaction isolation level is `READ_COMMITTED`. For querying the database we use JPA `EntityManager`. Please, pay attention that coming snippet extracts Hibernate session from it. We did it intentionally to demonstrate that problem is somewhere in Hibernate, probably, Hibernate cache. Here comes the code snippet demonstrating the issue. `runTransaction` method is launched in two concurrent transactions started under two different Hibernate sessions. First `Transaction1` is started, then `Transaction2`. Both of them try to acquire lock. But `Transaction2` loads an object before acquiring the lock. After passing into critical section (`Transaction1` is already comitted) it makes sure that the object is not in Hibernate cache and loads the object, which was updated by `Transaction1`. Unfortunately, it loads the version object same to one loaded before acquiring lock, so further updating fails with `StaleObjectException`. Does somebody know why `Transaction2` loads the old version of object after it is updated by `Transaction1`? We are sure, that object is updated in database by `Transaction1`. If we try to load it using Spring `JdbcTemplate` or Hibernate `StatelessSession` in the scope of `Transaction2`, update version is loaded. private void runTransaction(EntityManager entityManager, String name) { SessionFactory sf = ((HibernateEntityManagerFactory)emf).getSessionFactory(); Session statefullSession = sf.openSession(); System.out.println("*** Starting " + name + " ***"); statefullSession.beginTransaction(); BuildingType bt = null; //UNCOMMENT to get javax.persistence.OptimisticLockException: org.hibernate.StaleObjectStateException //Hibernate caches object and doesn`t notice changed made in Transaction1 later in the code if (name.equals("Transaction2")) { //Load object in Transaction2, but before obtaining lock System.out.println("*** Bean just before obtaining lock in " + name + " ***"); bt = entityManager.find(BuildingType.class, 1L); System.out.println(name + ": " + bt); } entityManager.createNativeQuery("SELECT count(*) FROM client_cleaner_lock FOR UPDATE").getSingleResult(); System.out.println("*** Lock in " + name + " ***"); if (name.equals("Transaction1")) { bt = (BuildingType)statefullSession.get(BuildingType.class, 1L); System.out.println(name + ": " + bt); bt.setName(name); //Make sure, that Transaction2 loads original object, unmodified by Transaction1 if (name.equals("Transaction1")) { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } statefullSession.update(bt); } else if (name.equals("Transaction2")) { statefullSession.clear(); System.out.println(statefullSession.contains(bt)); //!!! Returns object loaded before obtaining lock in Transaction2, not updated by Transaction1 !!! //http://stackoverflow.com/questions/179617/strange-hibernate-cache-issue bt = (BuildingType)statefullSession.get(BuildingType.class, 1L); System.out.println(name + ": " + bt); bt.setName(name); statefullSession.update(bt); } statefullSession.getTransaction().commit(); } And here comes the output: *** Starting Transaction1 *** *** Lock in Transaction1 *** Transaction1: Id: 1, Version: 0, Name: Apartment *** Starting Transaction2 *** *** Bean just before obtaining lock in Transaction2 *** Transaction2: Id: 1, Version: 0, Name: Apartment *** Lock in Transaction2 *** false Transaction2: Id: 1, Version: 0, Name: Apartment Exception in thread "Thread-4" org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [se.homework.hwbs.domain.server.entity.settings.BuildingType#1]
0
[ 2, 4148, 2102, 8820, 19, 19513, 12799, 1437, 1, 38, 6305, 1054, 9686, 69, 19, 226, 12799, 800, 3726, 3726, 19, 318, 3010, 95, 57, 2507, 1050, 16, 1797, 12904, 34, 19513, 13147, 9, 48, 2507, 1050, 25, 15459, 34, 6018, 3991, 45, 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...
Unable to insert records in SQLite database using Entity Framework 5 === I was trying to use SQLite database using ADO.NET Entity Framework 5 and I was able to connect to the SQLite database and was able to query records from a table in database. But When I am trying to insert a record into table the program crashes. I am attaching the sample application [here][1]. Use Open Db to open the sample database first and then try to import the CSV file. Please help in fixing the problem. Thanks! [1]: https://skydrive.live.com/redir?resid=BF69AAF5344E2B32!318
0
[ 2, 2343, 20, 14692, 742, 19, 4444, 10601, 6018, 568, 9252, 6596, 331, 800, 3726, 3726, 31, 23, 749, 20, 275, 4444, 10601, 6018, 568, 21, 537, 9, 2328, 9252, 6596, 331, 17, 31, 23, 777, 20, 6379, 20, 14, 4444, 10601, 6018, 17, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
javafx-2 getStyleClass().removeAll === I just started out playing around with CSS in javafx 2. I have some issues with removing CSS style classes from a Pane. The Pane gets a background color and border based on a boolean value of a custom object: //kw is a subobject of objects in a listview, everytime the selection is changed //the CSS on the pane gets refreshed resetGUI(); ... if(kw != null){ if (kw.getAfgewerkt()) { pRA.getStyleClass().add("success"); //true } else { pRA.getStyleClass().add("error"); //false } } ... The above works. However before I set the style classes on the pRA Node, I reset the CSS by calling resetGUI() method because when the kw object is null, no CSS should be applied. public void resetGUI(){ ... pRA.getStyleClass().removeAll("error", "success"); ... } It seems that the removing of the StyleClasses does not work. I want the pRa node to look as 'default' if the kw object is null. Do I have to create a 'default' class myself in the CSS file? That shouldn't be the case I assume? This is the css: .error {-fx-background-color: #FBE3E4;-fx-text-fill:#8a1f11;-fx-border-style:solid;-fx-border-color:#FBC2C4;} .success {-fx-background-color:#E6EFC2;-fx-text-fill:#264409;-fx-border-style:solid;-fx-border-color:#C6D880;}
0
[ 2, 8247, 16488, 8, 135, 164, 4381, 1898, 5, 6, 9, 99, 16598, 1233, 800, 3726, 3726, 31, 114, 373, 70, 791, 140, 29, 272, 18, 18, 19, 8247, 16488, 172, 9, 31, 57, 109, 1549, 29, 9096, 272, 18, 18, 1034, 2684, 37, 21, 13, 1666...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
setSpan not working in QTableWidget === I have a table widget in which I can add sub rows in a row, spanning the first cell of the row across multiple rows. Now I need to set the column span of a cell to span across multiple existing rows in QTableWidget. I am currently trying to do this using setSpan() method of QTableWidget. But this works correctly when I am adding a new row and then setting the span of the cell of the previous row. This does not work correctly when I am just setting the span of a cell to span across already existing rows. It seems to add span to the cell, but does not merge the cells as expected.The following is my code: ui.tableWidget->setSpan(row, 0, totalspan, 1); Can you help me how to 'merge' the cells in the first column and not affecting the other columns? Thanks, Rakesh.
0
[ 2, 3415, 3206, 52, 638, 19, 2593, 5924, 3976, 43, 3060, 800, 3726, 3726, 31, 57, 21, 859, 4807, 43, 3060, 19, 56, 31, 92, 3547, 972, 11295, 19, 21, 3131, 15, 16092, 14, 64, 1667, 16, 14, 3131, 464, 1886, 11295, 9, 130, 31, 376...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 achieve module subfolders where i can have multiple 'module' folders in a folder inside modules called api? On Zend Framework === How can i achieve module subfolders, where i can have multiple 'module' folders in a folder inside modules called api. - application/modules/api/module1/... - application/modules/api/module2/... - application/modules/api/module3/... - application/modules/module1/... My purpose is to create a restful api but have all those new modules under a subdirectory. Another catch here, is that modules outside of the app may have the same name as the ones outside. So My class naming would be like.. Api_Module1_... Api_Module2_... Api_Module3_... Module1... I cant seem to actually make this work so far...
0
[ 2, 184, 92, 31, 4689, 12613, 972, 8814, 445, 113, 31, 92, 57, 1886, 13, 22, 19673, 62, 22, 19294, 18, 19, 21, 19294, 572, 17113, 227, 21, 2159, 60, 27, 10526, 43, 6596, 800, 3726, 3726, 184, 92, 31, 4689, 12613, 972, 8814, 445, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I declare a Tdictionary of string, open array (TDictionary<string, array>) in Delphi === I would like to have a function that takes a dictionary of string, array of variant. So it can be called with: searchDictionary := TDictionary<string, array of variant>; searchDictionary.Add('KEY_NAME', ['X01%', '%D01']); aValue := TDtoClass.Search(searchDictionary) I am currently achieving this by searchDictionary := TDictionary<string, TList<variant>>.Create; searchDictionary.Add('BIN_NAME', TSearch.Values(['X01%', '%D01'])); where Tsearch is a class that exposes: class function TSearch.Values(const arguments: array of variant): TList<variant>; var list : TList<variant>; item: variant; begin list := TList<variant>.Create; for item in arguments do begin list.Add(item); end; Result := list; end; What I would like to do is: searchDictionary.Add('BIN_NAME', ['X01%', '%D01']); instead of: searchDictionary.Add('BIN_NAME', TSearch.Values(['X01%', '%D01'])); Any help will be greatly appreciated.
0
[ 2, 92, 31, 10123, 21, 13, 38, 22595, 1857, 16, 3724, 15, 368, 7718, 13, 5, 38, 22595, 1857, 1, 11130, 15, 7718, 1, 6, 19, 23030, 800, 3726, 3726, 31, 83, 101, 20, 57, 21, 1990, 30, 1384, 21, 9186, 16, 3724, 15, 7718, 16, 832...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Exclude multiple lines from in Bash (Version: 3.2.48) === The idea is to calculate SHA256 hashes for all files in a directory (including all subdirectories), but exclude some files specified in another text file. The problem is if I specify the following files (see below the code) to exclude, only one of them is excluded, not both. Here is my code: while read line do if [ $line_count -eq 0 ] then exclude_files=".*/$line$" else exclude_files="${exclude_files}\|.*/$line$" fi line_count=$(( $line_count + 1 )) done < exclude-files.txt find . -type f -print0 | xargs -0 shasum -a 256 | grep -v -P "${exclude_files}" > ~/out.txt Contents of the file `exclude-files.txt`: Icon\\r .DS_Store --- empty line --- The file `Icon\r` is a special file for changing a folder's icon, its name contains a `CR`. (I'm on Mac OS X 10.7.4)
0
[ 2, 21077, 1886, 1560, 37, 19, 13158, 13, 5, 10898, 45, 203, 9, 135, 9, 3216, 6, 800, 3726, 3726, 14, 882, 25, 20, 18469, 4116, 16910, 63, 438, 18, 26, 65, 6488, 19, 21, 16755, 13, 5, 3970, 65, 972, 10197, 1596, 6, 15, 47, 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...
FGallery does not begin in thumbnail view === What am I doing wrong? FGallery is not starting in thumbnail view? FotosGalleryViewController *vc = [[FotosGalleryViewController alloc] initWithPhotoSource:self]; vc.beginsInThumbnailView = YES; [self.navigationController pushViewController:vc animated:YES];
0
[ 2, 398, 14074, 3849, 630, 52, 2348, 19, 5078, 325, 947, 1418, 800, 3726, 3726, 98, 589, 31, 845, 1389, 60, 398, 14074, 3849, 25, 52, 1422, 19, 5078, 325, 947, 1418, 60, 4310, 262, 18, 14074, 3849, 4725, 12898, 1252, 1637, 8990, 80...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
List filenames and a count of the resident pages in filesystem cache? === In RHEL is there a way to list filenames and a count of the resident pages in filesystem cache?
0
[ 2, 968, 3893, 7259, 18, 17, 21, 2468, 16, 14, 5321, 4434, 19, 3893, 10724, 16522, 60, 800, 3726, 3726, 19, 9940, 255, 25, 80, 21, 161, 20, 968, 3893, 7259, 18, 17, 21, 2468, 16, 14, 5321, 4434, 19, 3893, 10724, 16522, 60, 3, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to put plenty of data (page content) into DB in Visual Studio? === I'm starting an adventure with ASP.NET and I'm creating mini CMS system just to be able to change content of website by logging into panel and changing content of appropriate page. The problem is that I have field in column in my database which is type of "text" and I cannot put there any page content that is divided into lines (content text, html markups and so). When I try to copy/paste operation into that field in table (in Server Explorer in VS 2010) it only copies first line of text, nothing more. Does anyone have any solution?
0
[ 2, 184, 20, 442, 7062, 16, 1054, 13, 5, 6486, 2331, 6, 77, 13, 9007, 19, 3458, 1120, 60, 800, 3726, 3726, 31, 22, 79, 1422, 40, 5270, 29, 28, 306, 9, 2328, 17, 31, 22, 79, 2936, 4236, 2390, 18, 329, 114, 20, 44, 777, 20, 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...
JBoss AS 7 on Ubuntu 12.04 server - Deployment errors === **Setup** --------- I setup a virtual machine with Ubuntu 12.04 64bit where I want to run JBoss AS 7 and deploy Nexus OSS as a war file. [This tutorial][1] was used to setup JBoss as a service on linux. I found [this thread][2], too, but the configuration script configuration didn't worked for as well as the script shipped with JBoss in `bin/init.d/`. **Deployment Problem** ---------------------- No I'm trying to deploy the [Nexus OSS war file][3]. I had two different approaches. **1. Deploy it via the webinterfaces** I got this error Request { "address" => [("deployment" => "nexus")], "operation" => "deploy" } Response Internal Server Error { "outcome" => "failed", "failure-description" => {"JBAS014671: Failed services" =>{"jboss.web.deployment.default-host.\"/nexus-2.0.6\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/nexus-2.0.6\": JBAS018040: Failed to start context"}}, "rolled-back" => true } **2. Autodeploy it in /usr/local/jboss-as-7/standalone/deployments/** JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment. However I could find any logs. I search in /var/log/jboss $JBOSS_HOME/standalone/log [1]: http://alexander.holbreich.org/2011/11/jboss-7-setup-linux/ [2]: http://stackoverflow.com/questions/6880902/start-jboss-7-as-a-service-on-linux [3]: http://www.sonatype.org/downloads/nexus-2.0.6.war
0
[ 2, 487, 10349, 18, 28, 453, 27, 287, 12968, 2473, 390, 9, 3277, 8128, 13, 8, 10475, 11908, 800, 3726, 3726, 13, 1409, 3554, 576, 1409, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 31, 18161, 21, 6599, 1940, 29, 287, 12968, 2473, 390, 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...
C++ several arguments === I have next code: int main() { OwnSelect(23, FD_READ | FD_WRITE); // <---- Several arguments as one return 0; } int OwnSelect(SOCKET s, long lNetworkEvents) { // How can i check that FD_READ has been passed? if(lNetworkEvents == FD_READ) { // never here } return 0; } How can i check that FD_READ has been passed no matter if another FD has been passed with FD_READ. Thanks!
0
[ 2, 272, 20512, 238, 10553, 800, 3726, 3726, 31, 57, 328, 1797, 45, 19, 38, 407, 5, 6, 13, 1, 258, 18, 16964, 5, 2001, 15, 398, 43, 1, 10647, 13, 1, 398, 43, 1, 23716, 6, 73, 12894, 13, 1, 8, 8, 8, 8, 238, 10553, 28, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
curl + "Validation of viewstate MAC failed." === I using curl to post data to another server, between each posting I use a function to fetch the hidden fields like "__VIEWSTATE". it worked like a charm before, but they updated there website, so i rewriten my code to use the new fieldnams, but on the last step i gets the error: "Validation of viewstate MAC failed." if I do the same step in a webbrowser it works as it should, I used an addon to fetch what postdata the browser was sending and compared it with what my script is sending, and its looks the same. My knowledge of ASP.NET is minimal, and all info i can find here about the error recomendates changes on the ASP-NET-server. So i hope someone here can guide me to find out why it in the browser have a 100% successrate, and curl have 0% successrate on that page, but using the same functions on previus pages, works 100% with curl. postdata the browser was sending: __EVENTTARGET= __EVENTARGUMENT= __VIEWSTATE=%2FwEPDwUKLTk2MDAxNjU3MA9kFgJmD2QWAgIDD2QWDgIFD2QWAgIBDw8WAh4EVGV4dAUfRsO2cmV0YWdzZ3J1cHBlbiBpIEfDtnRlYm9yZyBBQmRkAgcPDxYEHwAFH0bDtnJldGFnc2dydXBwZW4gaSBHw7Z0ZWJvcmcgQUIeC05hdmlnYXRlVXJsBR1%2BL0NsaWVudENhcmQuYXNweD9DbGllbnRJRD05OGRkAgkPDxYCHgdWaXNpYmxlZ2RkAgsPDxYEHwAFI0JZR0cgJiBFTkVSR0lTRVJWSUNFIFPDlkRFUlTDllJOIEFCHwEFNH4vQ3VzdG9tZXJPdmVydmlldy5hc3B4P0NsaWVudElEPTk4JkN1c3RvbWVySUQ9MjY0NDBkZAINDw8WAh8CZ2RkAg8PDxYCHwAFE1JlZGlnZXJhIGFudsOkbmRhcmVkZAIVDw8WAh8CaGQWAgIDDxBkZBYBZmQYAgUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFg0FFmN0bDAwJGJvZHkkY2hrSXNBY3RpdmUFHmN0bDAwJGJvZHkkY2hrSGFzU3VwZXJVc2VyUGVybQUfY3RsMDAkYm9keSRjaGtIYXNTdGF0aXN0aWNzUGVybQUkY3RsMDAkYm9keSRjaGtIYXNBbm51YWxSZXBvcnRTZXJ2aWNlBTBjdGwwMCRib2R5JGNoa0hhc0NvcnBvcmF0aW9uQ2hhcnRlclJlcG9ydFNlcnZpY2UFN2N0bDAwJGJvZHkkY2hrSGFzQ2VydGlmaWNhdGVPZlJlZ2lzdHJhdGlvblJlcG9ydFNlcnZpY2UFH2N0bDAwJGJvZHkkY2hrSGFzTW9uaXRvclNlcnZpY2UFK2N0bDAwJGJvZHkkY2hrSGFzRGlnaXRhbFNwYXJya2F0YWxvZ1NlcnZpY2UFJmN0bDAwJGJvZHkkY2hrSGFzUGVyc29ua29udHJvbGxTZXJ2aWNlBSVjdGwwMCRib2R5JGNoa0hhc0NvbXBhbnlSZXBvcnRTZXJ2aWNlBSRjdGwwMCRib2R5JGNoa0hhc1BlcnNvblJlcG9ydFNlcnZpY2UFHWN0bDAwJGJvZHkkY2J4UmVwb3J0c0NvbXBhbnkzBRxjdGwwMCRib2R5JGNieFJlcG9ydHNQZXJzb24zBRBjdGwwMCRtbHRDb250ZW50Dw9kZmR8z6SDM7weB%2BgWrg%2B8u3EnNPkQGA%3D%3D __EVENTVALIDATION=%2FwEWFwKGsKOJCgK70ZWTDQLr%2BJWFDQKo1a2oCwKplfT%2BCgLRieqTAwKt6qHvAQK9rKu9AgKh%2F5ODDQKqtpTtDQLvv7CxBALa4vDGBQKCuafwDwKP1ZOjBgKsqdXxCgL6hbmQBwK%2BjaGZDQL%2FqY7cBALml%2FqcBgLYg53pDwL108DhBQLfzPnCAQLBr6dM9cK5UIsGFZ5ocJchTM8CHTFigfk%3D ctl00%24body%24cmdSave=Spara ctl00%24body%24txtName=BYGG+%26+ENERGISERVICE+S%C3%96DERT%C3%96RN+AB ctl00%24body%24txtUserName=5566960836 ctl00%24body%24txtEmail=anonym%40telia.se ctl00%24body%24txtDepartment= ctl00%24body%24chkIsActive=on ctl00%24body%24chkHasStatisticsPerm=on ctl00%24body%24txtLoginName=5566960836 ctl00%24body%24txtPassword=stackoverflow ctl00%24body%24chkHasAnnualReportService=on ctl00%24body%24chkHasCorporationCharterReportService=on ctl00%24body%24chkHasCertificateOfRegistrationReportService=on ctl00%24body%24chkHasMonitorService=on ctl00%24body%24chkHasDigitalSparrkatalogService=on ctl00%24body%24chkHasPersonkontrollService=on ctl00%24body%24chkHasCompanyReportService=on ctl00%24body%24chkHasPersonReportService=on ctl00%24body%24cbxReportsCompany3=on ctl00%24body%24cbxReportsPerson3=on ctl00%24body%24hidNewUser=1 the post data my script is sending Array ( [__EVENTTARGET] => [__EVENTARGUMENT] => [__VIEWSTATE] => /wEPDwUKLTk2MDAxNjU3MA9kFgJmD2QWAgIDD2QWDgIFD2QWAgIBDw8WAh4EVGV4dAUfRsO2cmV0YWdzZ3J1cHBlbiBpIEfDtnRlYm9yZyBBQmRkAgcPDxYEHwAFH0bDtnJldGFnc2dydXBwZW4gaSBHw7Z0ZWJvcmcgQUIeC05hdmlnYXRlVXJsBR1+L0NsaWVudENhcmQuYXNweD9DbGllbnRJRD05OGRkAgkPDxYCHgdWaXNpYmxlZ2RkAgsPDxYEHwAFI0JZR0cgJiBFTkVSR0lTRVJWSUNFIFPDlkRFUlTDllJOIEFCHwEFNH4vQ3VzdG9tZXJPdmVydmlldy5hc3B4P0NsaWVudElEPTk4JkN1c3RvbWVySUQ9MjY0NDBkZAINDw8WAh8CZ2RkAg8PDxYCHwAFE1JlZGlnZXJhIGFudsOkbmRhcmVkZAIVDw8WAh8CaGQWAgIDDxBkZBYBZmQYAgUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFg0FFmN0bDAwJGJvZHkkY2hrSXNBY3RpdmUFHmN0bDAwJGJvZHkkY2hrSGFzU3VwZXJVc2VyUGVybQUfY3RsMDAkYm9keSRjaGtIYXNTdGF0aXN0aWNzUGVybQUkY3RsMDAkYm9keSRjaGtIYXNBbm51YWxSZXBvcnRTZXJ2aWNlBTBjdGwwMCRib2R5JGNoa0hhc0NvcnBvcmF0aW9uQ2hhcnRlclJlcG9ydFNlcnZpY2UFN2N0bDAwJGJvZHkkY2hrSGFzQ2VydGlmaWNhdGVPZlJlZ2lzdHJhdGlvblJlcG9ydFNlcnZpY2UFH2N0bDAwJGJvZHkkY2hrSGFzTW9uaXRvclNlcnZpY2UFK2N0bDAwJGJvZHkkY2hrSGFzRGlnaXRhbFNwYXJya2F0YWxvZ1NlcnZpY2UFJmN0bDAwJGJvZHkkY2hrSGFzUGVyc29ua29udHJvbGxTZXJ2aWNlBSVjdGwwMCRib2R5JGNoa0hhc0NvbXBhbnlSZXBvcnRTZXJ2aWNlBSRjdGwwMCRib2R5JGNoa0hhc1BlcnNvblJlcG9ydFNlcnZpY2UFHWN0bDAwJGJvZHkkY2J4UmVwb3J0c0NvbXBhbnkzBRxjdGwwMCRib2R5JGNieFJlcG9ydHNQZXJzb24zBRBjdGwwMCRtbHRDb250ZW50Dw9kZmR8z6SDM7weB+gWrg+8u3EnNPkQGA== [__EVENTVALIDATION] => /wEWFwKGsKOJCgK70ZWTDQLr+JWFDQKo1a2oCwKplfT+CgLRieqTAwKt6qHvAQK9rKu9AgKh/5ODDQKqtpTtDQLvv7CxBALa4vDGBQKCuafwDwKP1ZOjBgKsqdXxCgL6hbmQBwK+jaGZDQL/qY7cBALml/qcBgLYg53pDwL108DhBQLfzPnCAQLBr6dM9cK5UIsGFZ5ocJchTM8CHTFigfk= [ctl00$body$hidNewUser] => 1 [ctl00$body$cmdSave] => Spara [ctl00$body$txtName] => BYGG & ENERGISERVICE SÖDERTÖRN AB [ctl00$body$txtUserName] => 5566960836 [ctl00$body$txtEmail] => anonym@telia.se [ctl00$body$txtDepartment] => [ctl00$body$chkIsActive] => 1 [ctl00$body$chkHasStatisticsPerm] => 1 [ctl00$body$txtLoginName] => 5566960836 [ctl00$body$txtPassword] => stackoverflow [ctl00$body$chkHasAnnualReportService] => 1 [ctl00$body$chkHasCorporationCharterReportService] => 1 [ctl00$body$chkHasCertificateOfRegistrationReportService] => 1 [ctl00$body$chkHasMonitorService] => 1 [ctl00$body$chkHasDigitalSparrkatalogService] => 1 [ctl00$body$chkHasPersonkontrollService] => 1 [ctl00$body$chkHasCompanyReportService] => 1 [ctl00$body$chkHasPersonReportService] => 1 [ctl00$body$cbxReportsCompany3] => 1 [ctl00$body$cbxReportsPerson3] => 1 ) The question: What client side differences can trigger the "Validation of viewstate MAC failed"-error? (notice: the postdata above have bean manipulated in 2 ways, first i replaced the password with "stackoverflow", and i also replace the user of email adress with anonym)
0
[ 2, 14320, 2754, 13, 7, 18506, 43, 857, 16, 1418, 3859, 1572, 1702, 9, 7, 800, 3726, 3726, 31, 568, 14320, 20, 678, 1054, 20, 226, 8128, 15, 128, 206, 15669, 31, 275, 21, 1990, 20, 18312, 14, 3689, 2861, 101, 13, 7, 1, 4725, 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...
Where to join development teams === I hope this question isn't out of focus. I've been wanting to find a way to improve my skills as a programmer. I've tried teaming up with game dev groups at my school and coming up with my own ideas for apps. But these things move very slowly for me and my ideas seem out of my reach due to lack of skill. I don't have a degree yet, but I've been learning to program for around 5-6 years now. I'm very efficient in learning programming skills and using them, but I find that there is a lack of projects for me to join and I have no clue where to find them. Anyone think they can help me out? My current languages are: C, C++, C#, Java, Python. I've worked with ASP.NET for web development and also dabbled around SQL Server. I want to learn more and become more efficient in programming and I think this is a best way to do it.
2
[ 2, 113, 20, 1865, 522, 952, 800, 3726, 3726, 31, 1376, 48, 1301, 2532, 22, 38, 70, 16, 1776, 9, 31, 22, 195, 74, 4638, 20, 477, 21, 161, 20, 3545, 51, 3207, 28, 21, 17968, 9, 31, 22, 195, 794, 173, 68, 71, 29, 250, 9664, 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...
Resizing an image on website for efficiency. === Evening! I currently have a website that aggregates images, the problem is those images are very large, and when I display them at smaller sizes, they still eat up a lot of computation. I'm curious as to how to actually force reduced size/quality without just smooshing it into a <div> element. Here is my site in question, you can see how 'laggy' it gets when you produce images: http://newgameplus.nikuai.net/TEST/index.html I was using timthumb.php to resize the images, but the host doesn't allow that script for some reason. Thanks!
0
[ 2, 10719, 3335, 40, 1961, 27, 2271, 26, 7836, 9, 800, 3726, 3726, 2089, 187, 31, 871, 57, 21, 2271, 30, 8544, 18, 3502, 15, 14, 1448, 25, 273, 3502, 50, 253, 370, 15, 17, 76, 31, 3042, 105, 35, 2012, 13403, 15, 59, 174, 2749, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 change dynamically "Site administration" string in Django's admin? === I want to replace "Site administration" by a custom string in my admin. I've already overridden "base.html" for some other purpose, but now I need to pass a variable to this template to replace `{{ title }}` in {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %} I've seen from <a href="http://stackoverflow.com/questions/9220042/django-how-to-pass-custom-variables-to-context-to-use-in-custom-admin-template">this question</a> that a variable can be passed to the change list template by overriding `changelist_view` and adding an `extra_context` in the model admin, but how can I pass an extra context to the "main" page of the admin"?
0
[ 2, 184, 20, 753, 7782, 1326, 13, 7, 9097, 1603, 7, 3724, 19, 3857, 14541, 22, 18, 21, 43, 2160, 60, 800, 3726, 3726, 31, 259, 20, 3934, 13, 7, 9097, 1603, 7, 34, 21, 5816, 3724, 19, 51, 21, 43, 2160, 9, 31, 22, 195, 614, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I store a List<T> in between orientation changes? === I have the following call in my onActivityCreated method and wish to only perform this call the first time the activity is created. Subsequently I wish to store the List elsewhere. loadedList = (List<HattrickPlayer>)HattrickHelper.load(getSherlockActivity(), FILENAME); What is the simplest way of storing and retrieving my loadedList in between orientation changes and other subsequent onActivityCreated() calls ?
0
[ 2, 184, 107, 31, 1718, 21, 968, 1, 38, 1, 19, 128, 10245, 1693, 60, 800, 3726, 3726, 31, 57, 14, 249, 645, 19, 51, 27, 19348, 18475, 2109, 17, 2536, 20, 104, 2985, 48, 645, 14, 64, 85, 14, 2358, 25, 679, 9, 1724, 31, 2536, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
in MVC error-An unhandled exception of type 'System.StackOverflowException' occurred in Morvel.DLL === I m using MVC architecture in asp.net 3.5 In edit m getting the above error 1)I have used stored procedure ALTER PROCEDURE [dbo].[editparty] ( @pcode nvarchar(50), @cname nvarchar(100), @cont nvarchar(50) ) AS update tbl_party set party_name=@cname,party_code = @pcode,party_contact =@cont where party_id=(Select party_id from tbl_party where party_code = @pcode) 2)this is my function in DAL class file public DataSet editp(BOParty pcode, BOParty PName, BOParty Tel) { OpenCnn(); SqlCommand cmd = new SqlCommand("editparty", cnn); cmd.CommandType = CommandType.StoredProcedure; SqlParameter[] par = { new SqlParameter("@pcode", pcode.pcode), }; cmd.Parameters.AddRange(par); SqlParameter[] nm = { new SqlParameter("@PName", pcode.pcode), }; cmd.Parameters.AddRange(nm); SqlParameter[] tl = { new SqlParameter("@Tel", pcode.pcode), }; cmd.Parameters.AddRange(tl); SqlDataAdapter ad = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); ad.Fill(ds); return ds; CloseCnn(); } 3)this in in BAL class file public DataSet editp(BOParty pcode, BOParty PName, BOParty Tel) { DataSet ds = new DataSet(); ds = new DataSet(); ds = editp(pcode, PName, Tel); return ds; } 4) this is in .cs file protected void edit_Click(object sender, EventArgs e) { pcode.pcode = txtpcde.Text; pcode.Tel= txtcont.Text; pcode.PName = txtcname.Text; DataSet ds = new DataSet(); ds = new DataSet(); ds = pcode.editp(pcode, PName, Tel); edit.Enabled = false; }
0
[ 2, 19, 307, 8990, 7019, 8, 210, 367, 3203, 1294, 5391, 16, 1001, 13, 22, 10724, 9, 25325, 2549, 9990, 10066, 872, 22, 2437, 19, 3756, 6532, 9, 43, 211, 800, 3726, 3726, 31, 307, 568, 307, 8990, 2607, 19, 28, 306, 9, 2328, 203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: textColor of disabled button in selector not showing? === I am trying to make a button with a selector my button can have the following states: - Enabled/Disabled - Pressed/Not Pressed According to the states mentioned above. I need to manipulate the button's: - Text color - background image The button starts off my being disabled so it should have the disabled textColor and the disabled button background. But I can see the default textColor (specified in style) and NO background image! Here is my selector button_selector.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:state_enabled="false" android:textColor="#9D9FA2" android:drawable="@drawable/button" /> <item android:state_pressed="true" android:state_enabled="true" android:drawable="@drawable/button_pressed"/> <item android:state_pressed="true" android:state_enabled="false" android:textColor="#9D9FA2" android:drawable="@drawable/button"/> <item android:state_pressed="false" android:state_enabled="true" android:drawable="@drawable/button"/> </selector> And here is my button declaration in the my layout.xml <Button android:id="@+id/reserve_button" android:text="@string/reserve_button" android:layout_width="120dp" android:layout_height="40dp" android:layout_marginTop="10dp" android:layout_marginLeft="20dp" android:paddingRight="15dp" android:layout_gravity="left" style="@style/buttonStyle" android:background="@drawable/button_selector" /> And finally this is my style (where my default textColor is set) <?xml version="1.0" encoding="utf-8"?> <resources> <style name="buttonStyle"> <item name="android:textStyle">bold</item> <item name="android:textColor">#282780</item> <item name="android:textSize">18sp</item> </style> </resources> Please help!
0
[ 2, 13005, 45, 1854, 11282, 16, 10154, 5167, 19, 23946, 52, 3187, 60, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 5167, 29, 21, 23946, 51, 5167, 92, 57, 14, 249, 202, 45, 13, 8, 9338, 118, 2906, 579, 43, 13, 8, 2931, 118, 1270,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Primefaces LightBox issues === I am using Primefaces Lightbox popup window in my application. The problem i am facing is when i click the link to open the corresponding page, its too slow to display the page through light box. Its take more time to loading. How i can i solve it. Link for LightBox : <p:lightBox style="display:inline"> <a href="login.xhtml">Login&nbsp;&nbsp;</a></p:lightBox> When i click the login the coressponding page login.xhtml is to be open through lightbox. I am using primefaces 3.0 and jsf 2.0.
0
[ 2, 1621, 6413, 18, 471, 5309, 1549, 800, 3726, 3726, 31, 589, 568, 1621, 6413, 18, 471, 5309, 1675, 576, 1463, 19, 51, 3010, 9, 14, 1448, 31, 589, 4325, 25, 76, 31, 10840, 14, 3508, 20, 368, 14, 7265, 2478, 15, 82, 266, 2276, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...