unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
dynamic content with ajax (ruby on rails) === I am using Rails and jquery, and I need a dynamic content with ajax. But I don't know how to get the current user ID For example the url is www.mywebsite.com/users/**20** In my javascript file I need the user ID (20) $.get("/users/<%= **20** %>.json", function(data) { }, "json"); Thanks in advance for any help.
0
[ 2, 7782, 2331, 29, 20624, 13, 5, 1820, 779, 27, 2240, 18, 6, 800, 3726, 3726, 31, 589, 568, 2240, 18, 17, 487, 8190, 93, 15, 17, 31, 376, 21, 7782, 2331, 29, 20624, 9, 47, 31, 221, 22, 38, 143, 184, 20, 164, 14, 866, 4155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 display a series of colors chosen for a gradient in Qt? === I want to make a QDialog box (I don't think there is one in the library...sigh) that allows the user to select any number of colors to add to a gradient (and possibly adjust them), sort of like the Gradient option that you can use to recolor objects in Power Point. Is there an easy way to go about this?
0
[ 2, 184, 92, 31, 3042, 21, 231, 16, 5268, 2519, 26, 21, 17442, 19, 2593, 38, 60, 800, 3726, 3726, 31, 259, 20, 233, 21, 2593, 4286, 5567, 1649, 13, 5, 49, 221, 22, 38, 277, 80, 25, 53, 19, 14, 1248, 9, 9, 9, 18, 6872, 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...
SQL Formula assistance === tablename: lineitem +----------------+-----+-----------+--------+ | item | amt | allocated | lotnum | +----------------+-----+-----------+--------+ | bags galore | 20 | Received | 000590 | | test inventory | 10 | Received | | | bags galore | 19 | Shipped | 000590 | | test inventory | 20 | Received | | +----------------+-----+-----------+--------+ Hello, I'm trying to create a SQL formula, but I've hit a brick wall. Above is my table. I'm looking for a formula that will compare the items and subtract where it is Shipped from Received on matching items and lotnum and it will add Received together. So the end result is this. +----------------+-----+--------+ | item | amt | lotnum | +----------------+-----+--------+ | bags galore | 1 | 000590 | +----------------+-----+--------+ | test inventory | 30 | | +----------------+-----+--------+
0
[ 2, 4444, 255, 3729, 4067, 800, 3726, 3726, 859, 7259, 45, 293, 2119, 79, 2754, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 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...
Builder pattern. Expansion interface === I have builder: public abstract class ScriptBuilder { public void buildScript() { this.commandList = Lists.newArrayList(); } public abstract void buildSleepCommand(long time); public abstract void buildSynchronizationCommand(); public abstract void buildTouchDownCommand(TouchPoint touchPoint); public abstract void buildTouchUpCommand(); public List<String> getScript() { return commandList; } } Implementation: public class StandardScriptBuilder extends ScriptBuilder{ … } I need to construct a new builder, which implements the new interface. This new interface is based on the interface ScriptBuilder: class NewScriptBuilder { public void buildNewCommand(TouchPoint startTouchPoint, TouchPoint endTouchPoint) { buildTouchDownCommand(startTouchPoint); buildSynchronizationCommand(); buildTouchDownCommand(endTouchPoint); } … } Is there any pattern that will extend the existing builder interface and keep builder advantage? I mean, if we extend the interface, we can not do: ScriptBuilder builder = new NewScriptBuilder(); … builder.buildNewCommand; If there is no solution, it is normal to use?: ((NewScriptBuilder)builder).buildNewCommand; Thx.
0
[ 2, 14960, 3732, 9, 3233, 6573, 800, 3726, 3726, 31, 57, 14960, 45, 317, 8502, 718, 3884, 20904, 13, 1, 317, 11364, 1895, 8741, 5, 6, 13, 1, 48, 9, 16239, 5739, 800, 7227, 9, 2681, 8576, 93, 5739, 5, 6, 73, 13, 1, 317, 8502, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to get the web.config from a deployed Web Role? === I'm currently trying to decide the merits of encrypting the web.config for a Web Role deployed to Azure. The answer to this question seems highlights the importance of knowing who can access the instance: http://stackoverflow.com/questions/8376264/shall-the-db-connectionstring-within-web-config-be-encrypted-when-using-azure-cl However, I was under the impression no-one could access a Web Role instance in a way that would allow them to read the web.config. So my question is this: **Is it possible to get the web.config from a deployed Web Role?** For example: Is there an option in the Azure Portal I haven't seen? Would it be possible to access via another deployment?
0
[ 2, 25, 32, 938, 20, 164, 14, 2741, 9, 14093, 2816, 37, 21, 6698, 2741, 597, 60, 800, 3726, 3726, 31, 22, 79, 871, 749, 20, 4073, 14, 5848, 18, 16, 1957, 11435, 68, 14, 2741, 9, 14093, 2816, 26, 21, 2741, 597, 6698, 20, 25715, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add confirmation message after validating portlet Preferences === i want to add a confirmation message and a redirect to my jsp when the form is validate. I saw this in liferay.com SessionMessages.add(actionRequest, config.getPortletName() + ".doConfigure"); This display a green lessage with "param has been save successfully". But doesn't work. It obviously uses Configuration menu, and i use Preferences menu, so can i adapt this line for my code? And when i change preferences, i want a redirect in my portlet, but for now, it still on the preferences page and i have to click on "return on the full page". And also, doest exist error message in the case the preferences aren't validate? Regards. Thank you
0
[ 2, 3547, 15939, 2802, 75, 7394, 1880, 1295, 1336, 9808, 18, 800, 3726, 3726, 31, 259, 20, 3547, 21, 15939, 2802, 17, 21, 302, 14706, 20, 51, 487, 3401, 76, 14, 505, 25, 7394, 1373, 9, 31, 441, 48, 19, 201, 2787, 9, 960, 3723, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why doesn't git merge the conflict-free changes automatically in some cases? === Doing `git pull` periodically I notice the command sometimes ends with the error like Your local changes to the following files would be overwritten by merge: app/Ribbon.xaml Please, commit your changes or stash them before you can merge In this particular case I have one line modified in this file locally, and its new version in the repository has also one faraway line changed - there are no conflicts, no renaming, no changes in line endings, no submodules. So in this case I would expect git to merge the changes automatically without requiring me to `git commit` or `git stash`... I know that git is able to merge changes automatically (it does this usually), but not in this case. And the question: **what may prevent git from merging the conflict-free changes automatically** (in this case)? I guess, some data may be missed in my question. If so, let me know what else should be checked.
0
[ 2, 483, 1437, 22, 38, 13, 10404, 12666, 14, 2930, 8, 4639, 1693, 7499, 19, 109, 1871, 60, 800, 3726, 3726, 845, 13, 1, 10404, 2201, 1, 19886, 31, 3551, 14, 1202, 1030, 3451, 29, 14, 7019, 101, 154, 375, 1693, 20, 14, 249, 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...
substr in PHP with Greek characters === I have 5 greek characters in a string. After I use substr in php the output is something like that α�. It should be αβγ. Any suggestions about encoding? I have tried header ('Content-type: text/html; charset=utf-8'); with no result. <?php $string = "αβγδε"; $thedoc = substr($string, 0, 3); echo $thedoc."<br/>"; ?>
0
[ 2, 972, 9729, 19, 13, 26120, 29, 1645, 1766, 800, 3726, 3726, 31, 57, 331, 1645, 1766, 19, 21, 3724, 9, 75, 31, 275, 972, 9729, 19, 13, 26120, 14, 5196, 25, 301, 101, 30, 13, 1, 13, 9, 32, 378, 44, 13, 1, 9, 186, 18389, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Projections with Entity Framework === I have a question about making projections with the Entity Framework. I have three tables: Profile, Biography and BiographyTranslation I want to do the following projection: (biographies = IQueryable<Biography>) return biographies.Select(b => new ProfileBiography { Id = b.BiographieID, OwnerId = b.Profile.ProfileID, Translations = b.Translations.Select(t => new DocumentTranslation() { DocumentId = b.BiographieID, FileName = t.BiographyTextFile, Title = t.Title, Text = t.Text, LanguageId = t.LanguageID }) } My Problem: The OwnerId is projected correctly, but the number of translations are always 0. Does projection not work on collection properties? I also tried biographies.Inlcude("Translations"), but the result was the same.
0
[ 2, 11607, 18, 29, 9252, 6596, 800, 3726, 3726, 31, 57, 21, 1301, 88, 544, 11607, 18, 29, 14, 9252, 6596, 9, 31, 57, 132, 7484, 45, 5296, 15, 8021, 17, 8021, 27455, 31, 259, 20, 107, 14, 249, 11607, 45, 13, 5, 2161, 23674, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django - Custom Sql for the User model === Which name need the sql-file in the sql folder? When I want to load custom sql for the User Model. [Initial SQL Data][1] [1]: https://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-sql-data
0
[ 2, 3857, 14541, 13, 8, 5816, 4444, 255, 26, 14, 4155, 1061, 800, 3726, 3726, 56, 204, 376, 14, 4444, 255, 8, 16877, 19, 14, 4444, 255, 19294, 60, 76, 31, 259, 20, 6305, 5816, 4444, 255, 26, 14, 4155, 1061, 9, 636, 27313, 4444, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Weird UIImageView's interacting for no apparent reason === This really has me stumped. I am making a game for iOS and these two UIIMageView's, declared in the .h, seem to interact for no reason at all! The following code is used in the same method and is called by a timer. When I test the app, the zombie rotates as well as the bullet! What is going on here? for (int i=0; i <= kMaxNumberBullets; i++) { bullet[i].transform = CGAffineTransformMakeRotation(-arrowAngle[i]); } zombie[zombieNumber].center = CGPointMake(zombie[zombieNumber].center.x-2, zombie[zombieNumber].center.y);
0
[ 2, 5455, 13, 5661, 22039, 4725, 22, 18, 24747, 26, 90, 5982, 1215, 800, 3726, 3726, 48, 510, 63, 55, 15781, 69, 9, 31, 589, 544, 21, 250, 26, 13, 7760, 17, 158, 81, 13, 5661, 22039, 4725, 22, 18, 15, 2482, 19, 14, 13, 9, 252...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 wrap jQuery UI Dialog in a div container? === My web portlet is being deployed to the liferay environment, which means that there are multiple jQuery css themes. The way I have been solving the multiple theme issue is by wrapping my portlet with my own class and adding that class as a container to the jquery-ui css (for example, using `.my-portlet .ui-dialog {}`). When I create a dialog using jQuery UI though, the dialog container is given the class `.ui-dialog`, so the theme becomes that of whatever theme liferay is using. My solution would be to wrap the dialog in my own div with a class of `my-portlet', which should cause it to use my own ui theme. How do I do this though? Using `$(#item).dialog()` automatically applies the `ui-dialog` class as the head container. I don't really want to have to modify the jQuery code.
0
[ 2, 184, 20, 8118, 487, 8190, 93, 13, 5661, 28223, 19, 21, 13, 12916, 12147, 60, 800, 3726, 3726, 51, 2741, 1295, 1336, 25, 142, 6698, 20, 14, 201, 2787, 2307, 15, 56, 1108, 30, 80, 50, 1886, 487, 8190, 93, 272, 18, 18, 6876, 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...
Time data values in R === how can I have a data set of only time intervals (no dates) in R, like the following: `TREATMENT_A TREATMENT_B` `1:01:12 0:05:00` `0:34:56 1:08:09` and compute mean times, etc, and draw boxplots with time intervals in the y-axis? I am new to R, and I searched for this but found no example in the net. Thanks
0
[ 2, 85, 1054, 4070, 19, 761, 800, 3726, 3726, 184, 92, 31, 57, 21, 1054, 309, 16, 104, 85, 15899, 13, 5, 251, 4076, 6, 19, 761, 15, 101, 14, 249, 45, 13, 1, 13581, 1130, 1, 58, 2202, 1, 220, 1, 13, 1, 165, 22674, 45, 918, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 generate light colour shades in javascript === Hello all I am working in JavaScript and want to generate colors for my graph.And I want a new color for every line and also the color should be light in shade. I have read about question of color generation in java script [http://stackoverflow.com/questions/1484506/random-color-generator-in-javascript][1] As I want new color for my line so random number generation will not work in my case Also the color should be light I have read about the colors RGB values but I didn't find them following any pattern as how to choose light color So any one can please guide me as is there a way to generate colors in sequence (avoid random) and choose only light color or any other function to make dark color lighter Thanks [http://cloford.com/resources/colours/500col.htm][2] [1]: http://stackoverflow.com/questions/1484506/random-color-generator-in-javascript [2]: http://cloford.com/resources/colours/500col.htm
0
[ 2, 184, 20, 7920, 471, 4609, 15969, 19, 8247, 8741, 800, 3726, 3726, 10975, 65, 31, 589, 638, 19, 8247, 8741, 17, 259, 20, 7920, 5268, 26, 51, 7210, 9, 290, 31, 259, 21, 78, 1665, 26, 352, 293, 17, 67, 14, 1665, 378, 44, 471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 XML file in c#? === I have following XML file, i want to know best way to read this XML file > <MyFile> <Companies> <Company>123</Company> <Company>456</Company> > <Company>789</Company> </Companies> </MyFile> As an output i need collection of values like "123,456,789" or it could be array of string[] Can we use Linq to xml? How?
0
[ 2, 184, 20, 1302, 23504, 3893, 19, 272, 5910, 60, 800, 3726, 3726, 31, 57, 249, 23504, 3893, 15, 31, 259, 20, 143, 246, 161, 20, 1302, 48, 23504, 3893, 13, 1, 13, 1, 915, 16877, 1, 13, 1, 18415, 17065, 1, 13, 1, 28359, 1, 91...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Filehandler download interrupts + session is gone === I wrote a ashx handler that streams files to the browser in a secure way, I want users to be authorised to get to these files. Problem is that when I steam big files (+40 MB), the session is gonen + the browser download suddenly interrupts after ~40 MB. I have web.config configured not to time-out before 240 minutes. testing this locally doesn't give me the same problem, testing this on my shared host does. Anyone can point me in the right direction? I tried with and without Reponse.Clear() public void ProcessRequest(HttpContext context) { int id; if (new Core.SecurityManager().CurrentUser != null) { try { id = Convert.ToInt32(context.Request.QueryString["id"]); } catch { throw new ApplicationException("id could not be parsed."); } string filename = new DocumentFactory().SelectDocumentById(id).Filename; string filePath = context.Server.MapPath("~/uploads/" + filename); //context.Response.Clear(); context.Response.AddHeader("content-disposition", "attachment; filename=" + filename); context.Response.ContentType = "application/octet-stream"; context.Response.WriteFile(filePath); //context.Response.Flush(); //context.Response.End(); } else { throw new AuthenticationException(); } } Web.config: <sessionState mode="InProc" cookieless="false" timeout="240"></sessionState>
0
[ 2, 3893, 3203, 1252, 7121, 15811, 18, 2754, 3723, 25, 1042, 800, 3726, 3726, 31, 738, 21, 3133, 396, 24641, 30, 9464, 6488, 20, 14, 16495, 19, 21, 4315, 161, 15, 31, 259, 3878, 20, 44, 22594, 20, 164, 20, 158, 6488, 9, 1448, 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...
Google Play country specific === I published the game “Wings of Fury” on Google Play two weeks ago. As expected the number of daily installs has been increasing as the game go up on the ranking list. What I don’t understand is why the number of daily installs is increasing significally faster in Germany (where I live) than in other countries<br/> daily installs:<br/> 14/07/2012, 15/07/2012, 16/07/2012, 17/07/2012, 18/07/2012 <br/> DE: 100 131 139 189 219<br/> RU: 24 33 36 49 88<br/> US: 9 12 15 16 18<br/> DE = Germany<br/> RU = Russia<br/> US = USA<br/> As you can see there are 219 downloads in Germany whereas there are only 18 in the USA. The game is not country specific,,, in fact the game is completely in English (there is not version in German) so I would expect to see the opposite. I haven’t started any promotion campaign in Germany or whatsoever.<br/> Do you know why is that happening?<br/> Is Google Play boosting the app in the country where the developer lives?<br/> Thanks
2
[ 2, 8144, 418, 475, 1903, 800, 3726, 3726, 31, 467, 14, 250, 13, 1, 3546, 18, 16, 7568, 1, 27, 8144, 418, 81, 1342, 1464, 9, 28, 1727, 14, 234, 16, 1954, 16146, 18, 63, 74, 3425, 28, 14, 250, 162, 71, 27, 14, 4992, 968, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to display Rails-like output from a Rake task? === I have a rake task that is used to set up a bunch of symlinks, but only if they don't already exist. Currently when you run the task, there is no output. So you don't know if anything happened. How can I provide output like Rails generators do by saying 'created' or 'skipped' for each of the symlinks? What gems or modules do i need to include to get this type of functionality? # example task :setup do if !File.symlink?('/example/link') %x{cd /example && ln -s /something link} end end
0
[ 2, 184, 20, 3042, 2240, 18, 8, 1403, 5196, 37, 21, 21009, 3005, 60, 800, 3726, 3726, 31, 57, 21, 21009, 3005, 30, 25, 147, 20, 309, 71, 21, 7653, 16, 13, 7261, 6258, 18, 15, 47, 104, 100, 59, 221, 22, 38, 614, 3182, 9, 871, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WePopover's position === I used WePopover (https://github.com/werner77/WEPopover) by tapping on a view. It's like a tooltip. The view can zoom by pinch or move by pan. But calling wepopover after pinch or pan, the view automatically restore the original position. It is different with uipopover on iPad. How can I fix it? This from my code: [self.tooltip presentPopoverFromRect:CGRectMake(point.x, point.y, 1, 1) inView:self.view.superview permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; Thank you very much.
0
[ 2, 95, 6057, 2549, 22, 18, 649, 800, 3726, 3726, 31, 147, 95, 6057, 2549, 13, 5, 21127, 18, 6903, 10404, 20926, 9, 960, 118, 4662, 1031, 4536, 118, 458, 6057, 2549, 6, 34, 17357, 27, 21, 1418, 9, 32, 22, 18, 101, 21, 5607, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I can't run my JAR file on Windows Vista === I have recently made a .JAR file called Electronics.jar (located in C:\Java\eclipse\Java\jdk1.7.0_03\bin>Electronics.jar) and it won't run. I have tried loads of different methods of running it. I have used the command C:\Java\eclipse\Java\jdk1.7.0_03\bin>javaw -jar Electronics.jar in the command prompt, I have tried the same command run from a batch file, and I have tried double clicking on the icon in windows explorer. The latter method made a popup box appear, asking which program I wanted to use to open the file. I found the javaw.exe file, selected it, and tried to run it with that, but nothing happened. Can anyone help?
0
[ 2, 31, 92, 22, 38, 485, 51, 5112, 3893, 27, 1936, 13520, 800, 3726, 3726, 31, 57, 1989, 117, 21, 13, 9, 6300, 3893, 227, 7956, 9, 6300, 13, 5, 18215, 19, 272, 45, 1, 1004, 1385, 1, 3319, 6013, 870, 1, 1004, 1385, 1, 728, 43,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
-WordPress- If I click the_terms( $post->ID, 'fgaleri', '', ', ', '' ); (category) then redirecting to index.php === I'm using custom post type named "fotograf". I want to show every post's category with <?php the_terms( $post->ID, 'fgaleri', '', ', ', '' ); ?> But if I click category then it redirects me to index.php and shows everything in posts (not custom post type). You can test it with open my web site link ( http://www.onurunwebsitesi.com/ ) Click to Tümünü Göster (Show All) and test it! After, click to Category: Atatürk, you will redirect to index.php , not archive-fotograf.php I tried this too: <?php the_terms( $wp_query->$post->ID, 'fgaleri', '', ', ', '' ); ?> But after this, my loop stopped and shows nothing in results. What sould I do? Thanks for your helps, in advance. My codes: archive-fotograf <?php /** * Displays the Pagination in Custom loop * */ ?> <?php get_header(); ?> <?php $aranan= $_GET['s']; $kategorim = intval($_GET['cat']); $myterm = get_term( $kategorim, 'fgaleri' ); $myslug = $myterm->slug; ?> <div id="content"> <?php $temp = $wp_query; //save old query $wp_query= null; //clear $wp_query $rakam= 0; //The query $wp_query = new WP_Query(); $wp_query->query( array( 'post_type' =>'fotograf', 's' => $aranan, 'paged' => $paged, 'taxonomy' => 'fgaleri', 'fgaleri' => $myslug ) ); //The loop ?> <div id="FGaleri_2"><div id="FGaleri_Ic"><div id="FGaleriBaslik">Fotoğraf Galerisi <form action="<?php echo get_bloginfo('wpurl'); ?>" id="searchformfoto" method="get" name="searchform"> <?php $args = array( 'taxonomy' => 'fgaleri', 'show_option_none' => 'Kategori Seçin', 'hierarchical' => 1 ); wp_dropdown_categories($args); ?> <div id="aramabolumufoto"><input name="s" id="sfoto" type="text" value=""/> <input type="hidden" name="post_type" value="fotograf" /> <input type="hidden" name="fgaleri" value="<?php echo $myslug; ?>" /> <input id="searchsubmitfoto" type="submit" value="Ara"/></div> </form> </div><div class="FGaleri_Ic_2"> <?php while ($wp_query->have_posts()): $wp_query->the_post(); $rakam++; ?> <div class="FGaleriItem2" style="<?php if ($rakam % 5 == 0 ) { ?>margin-right: 0px;<?php } ?>"> Category: <?php the_terms( $post->ID, 'fgaleri', '', ', ', '' ); ?> <div class="ResimUst"><?php if (has_post_thumbnail()) { ?><a href="<?php the_permalink() ?>"><?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );$url2 = get_bloginfo('template_directory') . "/timthumb.php?src=" . $url . "&amp;w=100&amp;h=100&amp;zc=1"; ?><img src="<?php if(get_option('of_timthumb')=="true") { echo $url2; } else { echo $url; } ?>" alt="" title="" width="100" height="100" /></a><?php } ?></div><div class="ResimAlt"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php ?> </div></div><?php endwhile; ?></div></div></div><div class="clearboth"></div> <?php if(function_exists('wp_pagenavi') ) { wp_pagenavi(); //function call for plugin pagination( wp pagenavi plugin) }else{ ?> <div id="navigasyon"> <span class="previous-entries"><?php next_posts_link('« Daha Eski Fotoğraflar'); ?></span> <span class="next-entries"><?php previous_posts_link('Daha Yeni Fotoğraflar »'); ?></span> </div> <?php }//endif ?> <?php wp_reset_postdata(); $wp_query = null; //Reset the normal query $wp_query = $temp;//Restore the query ?> </div><?php get_sidebar(); ?></div><?php get_footer(); ?> functions.php <?php add_action( 'init', 'register_cpt_fotograf' ); function register_cpt_fotograf() { $labels = array( 'name' => _x( 'Fotoğraflar', 'fotograf' ), 'singular_name' => _x( 'Fotoğraf', 'fotograf' ), 'add_new' => _x( 'Yeni Ekle', 'fotograf' ), 'add_new_item' => _x( 'Yeni Fotoğraf Ekle', 'fotograf' ), 'edit_item' => _x( 'Fotoğrafı Düzenle', 'fotograf' ), 'new_item' => _x( 'Yeni Fotoğraf', 'fotograf' ), 'view_item' => _x( 'Fotoğrafı Önizle', 'fotograf' ), 'search_items' => _x( 'Fotoğraf Ara', 'fotograf' ), 'not_found' => _x( 'Fotoğraf Bulunamadı', 'fotograf' ), 'not_found_in_trash' => _x( 'Çöpte Fotoğraf Bulunamadı', 'fotograf' ), 'parent_item_colon' => _x( 'Ana Fotoğraf:', 'fotograf' ), 'menu_name' => _x( 'Fotoğraflar', 'fotograf' ), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'supports' => array( 'title', 'author', 'thumbnail', 'custom-fields', 'comments' ), 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'publicly_queryable' => true, 'exclude_from_search' => false, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => array('slug' => 'fotograflar'), 'capability_type' => 'post' ); register_post_type( 'fotograf', $args ); } register_taxonomy("fgaleri", "fotograf", array("hierarchical" => true, "label" => "Fotoğraf Kategorileri", "singular_label" => "Fotoğraf Kategorisi", 'show_ui' => true, 'show_tagcloud' => false, "rewrite" => array('slug'=>'fkat'))); function mySearchFilter_0987($query) { $post_type = $_GET['post_type']; if (!$post_type) { $post_type = 'post'; } $query->set('post_type', $post_type); return $query; }; add_filter('pre_get_posts','mySearchFilter_0987'); // This filter will jump into the loop and arrange our results before they're returned function limit_posts_per_archive_page() { if (is_post_type_archive()) { $limit = 20; } else { $limit = get_option('posts_per_page'); } set_query_var('posts_per_archive_page', $limit); } add_filter('pre_get_posts', 'limit_posts_per_archive_page'); if (!term_exists( 'Fotoğraf Galerisi', 'fgaleri') ) { wp_insert_term( 'Fotoğraf Galerisi', 'fgaleri', array( 'description' => 'Fotoğraf Galerisi', 'slug' => 'fotogaleri' ) ); } add_filter( 'request', 'my_request_filter' ); function my_request_filter( $query_vars ) { if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) { $query_vars['s'] = " "; } return $query_vars; } ?>
0
[ 2, 13, 8, 9587, 5890, 8, 100, 31, 10840, 14, 1, 3964, 18, 5, 5579, 6962, 8, 1, 1340, 15, 13, 22, 410, 4941, 6137, 22, 15, 13, 7, 15, 13, 22, 15, 13, 22, 15, 13, 7, 13, 6, 73, 13, 5, 14375, 93, 6, 94, 302, 14706, 68, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
set Falang default language for joomla === I have my site in English & Spanish. I am using Falang Extension in Joomla Need to make Spanish language default. So that when a user visit the site he/she will see the spanish language. Is there anything I can do to make this possible
0
[ 2, 309, 8256, 1712, 12838, 816, 26, 2640, 2636, 531, 800, 3726, 3726, 31, 57, 51, 689, 19, 486, 279, 1273, 9, 31, 589, 568, 8256, 1712, 3896, 19, 2640, 2636, 531, 376, 20, 233, 1273, 816, 12838, 9, 86, 30, 76, 21, 4155, 2139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pass hidden parameter to controller in Rails3 === I'd like to pass the parameter "recipient" to controller. I'm succeeding at showing it in view by coding > @recipient.username How can I pass this value to params[:message][:recipient]? and I have no model called "Message" controllers/messages_controller.rb def deliver recipient = User.find_by_username(params[:recipient]) subject = params[:subject] body = params[:body] current_user.send_message(recipient, body, subject) redirect_to :controller => 'messages', :action => 'received' flash[:notice] = "message sent!" end views/messages/new.html.erb <td><%= @recipient.username if @recipient %></td> <%=form_for :messages, url: url_for( :controller => :messages, :action => :deliver ) do |f| %> <div class="field"> <%= f.label :subject %><br /> <%= f.text_field :subject %> </div> <div class="field"> <%= f.label :body %><br /> <%= f.text_field :body %> </div> <div class="actions"> <%= f.submit %> <% end %>
0
[ 2, 184, 20, 1477, 3689, 18906, 20, 9919, 19, 2240, 18, 240, 800, 3726, 3726, 31, 22, 43, 101, 20, 1477, 14, 18906, 13, 7, 15110, 2159, 2291, 7, 20, 9919, 9, 31, 22, 79, 14843, 35, 3187, 32, 19, 1418, 34, 13, 15458, 13, 1, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to copy MenuItem from one ContextMenu to another ContextMenu === How do I copy a MenuItem I created in one ContextMenu and copy it so that I can use it in a second ContextMenu? I tried to copy it directly and removing it, but I get _Element already has a logical parent. It must be detached from the old parent before it is attached to a new one._ foreach(MenuItem mi in menuOptions.Items) { entityRightClick.Items.Add(mi); menuOptions.Items.Remove(mi); } I tried grabbing the MenuItem using the ItemContainerGenerator, it gave me a blank MenuItem (Debugger says that it is null) for(int i = 0; i < menuOptions.Items.Count; i++) { MenuItem temp = new MenuItem(); temp = menuOptions.ItemContainerGenerator.ContainerFromIndex(i) as MenuItem; entityRightClick.Items.Add(temp); }
0
[ 2, 184, 20, 4344, 11379, 2119, 79, 37, 53, 4141, 755, 291, 20, 226, 4141, 755, 291, 800, 3726, 3726, 184, 107, 31, 4344, 21, 11379, 2119, 79, 31, 679, 19, 53, 4141, 755, 291, 17, 4344, 32, 86, 30, 31, 92, 275, 32, 19, 21, 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...
How can I call a webservice after an action on a User Control? === I'd like to call a webservice function (.asmx) when a user click on a checkbox, generated by a .NET (WEbForms) User Control : CheckBox chb = new CheckBox(); chb.InputAttributes.Add("value", "my_id_00"); chb.Text = "Title 00"; myPanel.Controls.Add(chb); and pass the parameter "value" (so, `my_id_00`). How can I do it?
0
[ 2, 184, 92, 31, 645, 21, 2741, 11449, 75, 40, 1028, 27, 21, 4155, 569, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 645, 21, 2741, 11449, 1990, 13, 5, 9, 472, 79, 396, 6, 76, 21, 4155, 10840, 27, 21, 2631, 5309, 15, 6756, 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...
passing parameters to a bat (or vbs) in php === Objective: Use PHP to call a vbs that converts an xls/xlsx file to a csv. Question: How can I pass a source file path and a destination file path to a vbs that converts xls/xlsx to csv and run that vbs in a PHP web application? Details: I have a working vbs that takes a source file path and a destination file path and converts the xls/xlsx at source file path into a csv. I can execute it from the Windows cmd line and it does exactly what I want it to do. I can also put the execution command into a bat file and run the bat file to achieve the same results. However, when I use exec()/shell_exec()/system() in PHP to execute the same command no csv is created. (If I try to run the bat from PHP using system() the contents of the bat file show up on the page, in fact, echo Conversion complete! prints "echo Conversion complete! Conversion complete.") I haven't seen any errors yet. Note: I know about PHPExcel, I'd prefer not to use it. excelToCsv.vbs On Error Resume Next if WScript.Arguments.Count < 2 Then WScript.Echo "Please specify the source and the destination files. Usage: ExcelToCsv <xls/xlsx source file> <csv destination file>" Wscript.Quit End If csv_format = 6 Set objFSO = CreateObject("Scripting.FileSystemObject") src_file = objFSO.GetAbsolutePathName(Wscript.Arguments.Item(0)) dest_file = objFSO.GetAbsolutePathName(WScript.Arguments.Item(1)) Dim oExcel Set oExcel = CreateObject("Excel.Application") Dim oBook Set oBook = oExcel.Workbooks.Open(src_file) oBook.SaveAs dest_file, csv_format oBook.Close False oExcel.Quit batConverter.bat excelToCsv.vbs conversionTestSourceMS2003.xls batTest.csv echo Conversion Complete! index.phtml <?php system("cmd /c batConvert.bat") ?> Note: All of the above files (along with conversionTestSourceMS2003.xls) are in the same directory. I have not implemented any way to pass the parameters (since I can't get it to work even if it's all hard coded...) Set Up: PHP5, Zend Framework, WAMP, Windows 7 (localhost).
0
[ 2, 2848, 12905, 20, 21, 3570, 13, 5, 248, 13, 20468, 18, 6, 19, 13, 26120, 800, 3726, 3726, 7038, 45, 275, 13, 26120, 20, 645, 21, 13, 20468, 18, 30, 8406, 18, 40, 993, 7532, 118, 396, 7532, 396, 3893, 20, 21, 272, 18, 710, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
stock exchange index should be double or decimal? === I'm calculating, say, NASDAQ, index. All stocks prices are decimal I can make weight decimal or double - it doesn't matter. nasdaq = weight1 * stock1 + weight2 * stock2 + .... + weightn * stockn. As stock price is decimal it seems it makes sense to make nasdaq index decimal. But i do not want to recalculate nasdaq index every time some stock is updated. Instead I want to "cache" previous value and then only calculate difference. For example if stock2 is changed, then: stock2OldPrice = stocks[2]; diff = stock2 - stock2OldPrice nasdaq += diff * weight2 // need to synchronize stocks[2] = stock2 Now I need to synchronize nasdaq index because stocks can be updated at the same time. For example I can receive in parallel threads new price for MSFT and INTC. So I have to write `Interlocked.Add(ref nasdaq, diff * weight2);` refer to my previous question http://stackoverflow.com/questions/11345634/how-to-synchronize-addition-from-different-threads-using-lock-free-code However I can not do that for `decimal` because decimals are not supported. Ok, lets try to declare `nasdaq` index as `double`? With doubles I can do `Interlocked.Add` but now another problem: cause on every step I will convert from decimal to double I will lost precision. And then my "smart caching algorithm" will not absolutely "precise". It means that after 100 000 000 of updates value of my index become completely wrong I can't deal with that. So it is not possible to use nor `double` neither `decimal`. I do see only one possible solution - I have to declare nasdaq index as `decimal` so I can keep using my "smart caching algorithm" and so I have to use more complex "synchronization" mechanism, likely I have to use spinlocks. Probably you can see simpler solution?
0
[ 2, 2070, 1950, 4348, 378, 44, 1494, 54, 26380, 60, 800, 3726, 3726, 31, 22, 79, 22937, 15, 395, 15, 7938, 43, 9105, 15, 4348, 9, 65, 2070, 18, 7334, 50, 26380, 31, 92, 233, 1763, 26380, 54, 1494, 13, 8, 32, 1437, 22, 38, 1161,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does the reference count when retrieving object from container not increase? === I have created a little test project to try to resolve a problem I am having in my main project. I've noticed that when retrieving an object from a container the reference count dosen't increment. I am confused why this is not the case? For example this code will not increase the reference count of the hereDoggy object: //Retrieve the dog, why does this not increment the reference count? Dog* hereDoggy = [cont1 objectAtIndex:0]; Below is the full example: -(void)doZombieProblem { NSMutableArray* cont1 = [NSMutableArray array]; NSMutableArray* cont2 = [NSMutableArray array]; NSMutableArray* cont3 = nil; //Create the dog pointer Dog* doggy = [[Dog alloc] initWithName:@"Bernard"]; //Add to container1 [cont1 addObject:doggy]; //Release the dog pointer [doggy release]; while ([cont1 count] > 0) { //Retrieve the dog, why does this not increment the reference count? Dog* hereDoggy = [cont1 objectAtIndex:0]; //Add it to cont2 [cont2 addObject:hereDoggy]; //Remove it from cont1. [cont1 removeObjectAtIndex:0]; //No need to release as we haven't increased the reference count. //[hereDoggy release]; } //I should be able to retrieve the dog here from cont2. Dog* bernard = [cont2 objectAtIndex:0]; //No need to release as we haven't increased the reference count. //[bernard release]; }
0
[ 2, 483, 630, 14, 2801, 2468, 76, 13, 6239, 3272, 8397, 3095, 37, 12147, 52, 1839, 60, 800, 3726, 3726, 31, 57, 679, 21, 265, 1289, 669, 20, 1131, 20, 9854, 21, 1448, 31, 589, 452, 19, 51, 407, 669, 9, 31, 22, 195, 2711, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
UpdateModel not updating when FormCollection contains empty key === I encountered a strange problem. When FormCollection.AllKeys contains item with empty key then Controller.UpdateModel method not updating a model. For this case before updating I remove empty key var formCollection = new FormCollection(controllerContext.HttpContext.Request.Form); formCollection.Remove(""); UpdateModel(MyModel, formCollection.ToValueProvider()); This code solves problem but more convenient would be override BindModel method in DefaultModelBinder class. Does anyone have ideas why it happens ? Thanks in advance.
0
[ 2, 11100, 13998, 52, 71, 43, 1880, 76, 505, 15015, 872, 1588, 2424, 1246, 800, 3726, 3726, 31, 8208, 21, 2578, 1448, 9, 76, 505, 15015, 872, 9, 1233, 4237, 18, 1588, 9101, 29, 2424, 1246, 94, 9919, 9, 576, 8209, 13998, 2109, 52, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Touch events are dropped in android === I am using FingerPaint example available in ApiDemos for drawing my finger movement on screen. Now instead of line, I am adding circles in my path object and this path with circle will be drawn when onDraw method is called. Now my issue is when I slowly move my finger it draws circles at the points given by [onTouchEvent][1] properly but when I move my finger with some speed, unlike line, it draws only few circles. After debugging, I found that while moving finger rapidly, some of the touch events are dropped by the view and on that points circles are not drawn. Can anyone give some pointers on this. Why this is happening? [1]: http://developer.android.com/reference/android/view/View.html#onTouchEvent%28android.view.MotionEvent%29
0
[ 2, 1723, 963, 50, 1539, 19, 13005, 800, 3726, 3726, 31, 589, 568, 2363, 20578, 823, 904, 19, 21, 2159, 19274, 18, 26, 3533, 51, 2363, 1018, 27, 2324, 9, 130, 700, 16, 293, 15, 31, 589, 4721, 7845, 19, 51, 2013, 3095, 17, 48, 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...
how to set a beahavor for all my buttons === i stared to built an app and i want that all my buttons in my app will look the same. i write code for one button and i want my other buttons look alike. here is my button code: UIImage *butimage = [UIImage imageNamed:@"button1.png"]; UIImage *butimage3 = [UIImage imageNamed:@"button1press.png"]; UIImage *butpress = [butimage3 stretchableImageWithLeftCapWidth:15 topCapHeight:0]; UIImage *butimage2 = [butimage stretchableImageWithLeftCapWidth:15 topCapHeight:0]; [button1 setBackgroundImage:butimage2 forState:UIControlStateNormal]; [button1 setBackgroundImage:butpress forState:UIControlStateHighlighted]; [button1 setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; [button1 setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted]; how can i do it? thanks
0
[ 2, 184, 20, 309, 21, 44, 58, 14462, 248, 26, 65, 51, 12861, 800, 3726, 3726, 31, 1836, 20, 392, 40, 4865, 17, 31, 259, 30, 65, 51, 12861, 19, 51, 4865, 129, 361, 14, 205, 9, 31, 2757, 1797, 26, 53, 5167, 17, 31, 259, 51, 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...
Shortening function definitions using multine patterns in haskell === Is it better to do: charToAction 'q' = Just $ WalkRight False charToAction 'd' = Just $ WalkRight True charToAction 'z' = Just Jump charToAction _ = Nothing or charToAction x = case x of 'q' -> Just $ WalkRight False 'd' -> Just $ WalkRight True 'z' -> Just Jump otherwise -> Nothing ?
0
[ 2, 502, 6286, 1990, 18544, 568, 1889, 556, 6282, 19, 63, 16507, 800, 3726, 3726, 25, 32, 574, 20, 107, 45, 1795, 111, 8645, 13, 22, 1251, 22, 800, 114, 5579, 1466, 4183, 4997, 1795, 111, 8645, 13, 22, 43, 22, 800, 114, 5579, 146...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 dialog alert === i m newbie in programming. Really appreciate if someone willing to answer my question. I have a rotating galleryview at the back. But when a dialog alert come out is there any method can be used to "freeze" the rotation of the gallery view? Thanks.
0
[ 2, 13005, 28223, 7863, 800, 3726, 3726, 31, 307, 78, 5893, 19, 3143, 9, 510, 8831, 100, 737, 4452, 20, 1623, 51, 1301, 9, 31, 57, 21, 16164, 2246, 4725, 35, 14, 97, 9, 47, 76, 21, 28223, 7863, 340, 70, 25, 80, 186, 2109, 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...
SQLite.NET output parameter === I have a object that contains data from a DB. The object has a ID, which in the DB is auto increment field. When creating an object i dont know his ID, until i insert a new record to the DB. Then i want to get back the auto generated value of ID field. I tried to do so by adding a Output parameter, but SQLite.NET throws a `NotSupportedException` when i try to set the `Direction` to `ParameterDirection.Output`. What can i do? The other fields except ID are not unique. A other option is to auto increment manually, in the program, but it seems to be a bit complicated to implement. Thanks a lot.
0
[ 2, 4444, 10601, 9, 2328, 5196, 18906, 800, 3726, 3726, 31, 57, 21, 3095, 30, 1588, 1054, 37, 21, 13, 9007, 9, 14, 3095, 63, 21, 4924, 15, 56, 19, 14, 13, 9007, 25, 3108, 13, 28461, 575, 9, 76, 2936, 40, 3095, 31, 1049, 143, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SFTP not supported error with PHP & cURL === I followed the advice from [this Stack Overflow question thread][1], but I keep hitting a snag. I am receiving the following error message: Unsupported protocol: sftp Here is my code: $ch = curl_init(); if(!$ch) { $error = curl_error($ch); die("cURL session could not be initiated. ERROR: $error.""); } $fp = fopen($docname, 'r'); if(!$fp) { $error = curl_error($ch); die("$docname could not be read."); } curl_setopt($ch, CURLOPT_URL, "sftp://$user_name:$user_pass@$server:22/$docname"); curl_setopt($ch, CURLOPT_UPLOAD, 1); curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_SFTP); curl_setopt($ch, CURLOPT_INFILE, $fp); curl_setopt($ch, CURLOPT_INFILESIZE, filesize($docname)); //this is where I get the failure $exec = curl_exec ($ch); if(!$exec) { $error = curl_error($ch); die("File $docname could not be uploaded. ERROR: $error."); } curl_close ($ch); [1]: http://stackoverflow.com/questions/717854/sftp-from-within-php I used the curl_version() function to see my curl information, and found that sftp doesn't seem to be in the array of supported protocols: [version_number] => 462597 [age] => 2 [features] => 1597 [ssl_version_number] => 0 [version] => 7.15.5 [host] => x86_64-redhat-linux-gnu [ssl_version] => OpenSSL/0.9.8b [libz_version] => 1.2.3 [protocols] => Array ( [0] => tftp [1] => ftp [2] => telnet [3] => dict [4] => ldap [5] => http [6] => file [7] => https [8] => ftps ) Is this a matter of my version of cURL being outdated, or is the SFTP protocol simply not supported at all? Any advice is greatly appreciated.
0
[ 2, 15025, 13726, 52, 1827, 7019, 29, 13, 26120, 279, 14320, 800, 3726, 3726, 31, 709, 14, 4978, 37, 636, 1565, 7566, 20285, 1301, 9322, 500, 2558, 165, 500, 15, 47, 31, 643, 6687, 21, 28755, 9, 31, 589, 3396, 14, 249, 7019, 2802, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why don't I get exception when invalid XML is validated with Schema? === Here is XML Schema: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="products"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="product" type="ProductType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="ProductType"> <xs:sequence> <xs:element name="id" type="xs:long" /> <xs:element name="name" type="xs:string" /> <xs:element name="price" type="xs:decimal" /> </xs:sequence> </xs:complexType> </xs:schema> XML file that is validated for conformance: <?xml version="1.0" ?> <products> <product> <invalid_tag>32342</invalid_tag> <name>Some name</name> <price>3.89</price> </product> </products> Java code that works with XML and should test conformance: SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); factory.setSchema(schemaFactory.newSchema(new File(xmlSchema))); parser = factory.newSAXParser(); ProductsSaxHandler handler = new ProductsSaxHandler(); parser.parse(new File(xmlFile), handler); But I don't get any exception. What is wrong?
0
[ 2, 483, 221, 22, 38, 31, 164, 5391, 76, 16671, 23504, 25, 7394, 1669, 29, 23874, 60, 800, 3726, 3726, 235, 25, 23504, 23874, 45, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 19608, 3726, 7, 1982, 410, 8, 457, 7, 60, 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...
fstat - total file descriptor count on the system? === How to get the current count of file descriptors in the system? I know how to get the maximum. % sysctl kern.maxfiles kern.maxfiles: 8232 Ref: http://www.freebsd.org/cgi/man.cgi?query=fstat&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
0
[ 2, 398, 10631, 13, 8, 600, 3893, 121, 8741, 248, 2468, 27, 14, 329, 60, 800, 3726, 3726, 184, 20, 164, 14, 866, 2468, 16, 3893, 121, 8741, 248, 18, 19, 14, 329, 60, 31, 143, 184, 20, 164, 14, 2979, 9, 13, 11881, 10315, 3862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Syntax error when installing the spkg package of wxPython on Sage === When I want to install the package wxPython-2.8.7.1.spkg from [here][1] [1]: http://www.sagemath.org/packages/experimental/ in the terminal of Sage it gives me a syntax error. What i write in Sage terminal and the result are as follow: sage: sage -i wxPython-2.8.7.1.spkg ------------------------------------------------------------ File "<ipython console>", line 1 sage -i wxPython-RealNumber('2.8').gen(7).1.spkg ^ SyntaxError: invalid syntax I also use the direct address of the package but the result was the same: sage: sage -i http://www.sagemath.org/packages/experimental/wxPython-2.8.7.1.s> ------------------------------------------------------------ File "<ipython console>", line 1 sage -i http://www.sagemath.org/packages/experimental/wxPython-RealNumber('2.8').gen(7).1.spkg ^ SyntaxError: invalid syntax I also downloaded the package and used the local address but the result was the same.
0
[ 2, 22649, 7019, 76, 25429, 14, 3782, 16901, 6030, 16, 619, 396, 6448, 11570, 27, 9527, 800, 3726, 3726, 76, 31, 259, 20, 16146, 14, 6030, 619, 396, 6448, 11570, 8, 135, 9, 457, 9, 465, 9, 165, 9, 3401, 16901, 37, 636, 6836, 500,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SSIS custom script: loop over columns to concatenate values === I'm trying to create a custom script in SSIS 2008 that will loop over the selected input columns and concatenate them so they can be used to create a SHA1 hash. I'm aware of the available custom components but I'm not able to install them on our system at work. Whilst the example posed here appears to work fine http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/69766/ when I've tested this selected only a few and not all columns I get odd results. The script only seems to work if columns selected are in sequential order. Even when they are in order, after so many records or perhaps the next buffer different MD5 hashes are generated despite the rows being exactly the same throughout my test data. I've tried to adapt the code from the previous link along with these articles but have had no joy thus far. http://msdn.microsoft.com/en-us/library/ms136020.aspx http://agilebi.com/jwelch/2007/06/03/xml-transformations-part-2/ As a starting point this works fine to display the column names that I have selected to be used as inputs Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer) For Each inputColumn As IDTSInputColumn100 In Me.ComponentMetaData.InputCollection(0).InputColumnCollection MsgBox(inputColumn.Name) Next End Sub Building on this I try to get the values using the code below: Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer) Dim column As IDTSInputColumn100 Dim rowType As Type = Row.GetType() Dim columnValue As PropertyInfo Dim testString As String = "" For Each column In Me.ComponentMetaData.InputCollection(0).InputColumnCollection columnValue = rowType.GetProperty(column.Name) testString += columnValue.GetValue(Row, Nothing).ToString() Next MsgBox(testString) End Sub Unfortunately this does not work and I receive the following error: ![SSIS Error Message][1] I'm sure what I am trying to do is easily achievable though my limited knowledge of VB.net and in particular VB.net in SSIS, I'm struggling. I could define the column names individually as shown here http://timlaqua.com/2012/02/slowly-changing-dimensions-with-md5-hashes-in-ssis/ though I'd like to try out a dynamic method. [1]: http://i.stack.imgur.com/zkcDw.jpg
0
[ 2, 13, 18, 4557, 5816, 3884, 45, 5293, 84, 7498, 20, 1065, 9530, 8820, 4070, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 5816, 3884, 19, 13, 18, 4557, 570, 30, 129, 5293, 84, 14, 1704, 6367, 7498, 17, 1065, 9530, 8820, 105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Debugging VB6 Code From Visual Studio 2010 === I have .NET 3.5 web application which uses some COM dll created in VB6. I have source code for both. Also I have pdb file for the COM dll. I would like to load the VB6 dll code inside Visual Studio 2010 for debugging. I am able to step into dll code from VS If I loaded the COM app in VB6 IDE. Since I am new to VB, debugging using VB6 IDE is bit tedious for me. So I wanted to debug the COM app code inside Visual Studio 2010. I followed the instructions in [Robgruen's Blog][1] The problem is VS2010 automatically creating Interop dll for the corresponding COM dll, and It uses the Interop dll only. While debugging when I try to manually load the Symbol file for the COM dll(let's say MyComApp.dll) It fails and VS is instructing me to load Interop.MyComApp.pdb file. But I have MyComApp.pdb only. How do I make this work? [1]: http://blogs.msdn.com/b/robgruen/archive/2004/11/09/254602.aspx
0
[ 2, 121, 16254, 2762, 13, 20468, 379, 1797, 37, 3458, 1120, 498, 800, 3726, 3726, 31, 57, 13, 9, 2328, 203, 9, 264, 2741, 3010, 56, 2027, 109, 13, 960, 13, 43, 211, 679, 19, 13, 20468, 379, 9, 31, 57, 1267, 1797, 26, 156, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I find the maximum database space and the used database space in SQL Azure? === In SQL Azure each database has a size limitation ([adjustable][1]). In order for my service to not suddenly come to a halt I'd like to be able to programmatically find the current maximum size and current actually used space (and generate and alert once some threshold is reached). Looks like [`sp_mstablespace` can be used to solve this problem][2], but this stored procedure is not available in SQL Azure. How do I find the current maximum allowed size and current actually used space in a SQL Azure database? [1]: http://stackoverflow.com/q/6430243/57428 [2]: http://stackoverflow.com/a/401062/57428
0
[ 2, 184, 107, 31, 477, 14, 2979, 6018, 726, 17, 14, 147, 6018, 726, 19, 4444, 255, 25715, 60, 800, 3726, 3726, 19, 4444, 255, 25715, 206, 6018, 63, 21, 1072, 24943, 13, 5, 2558, 1283, 2759, 579, 500, 2558, 165, 500, 6, 9, 19, 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...
jquery fancybox background with an image === I wanto to apply at the plugin jQuery called fancybox an image backfround with a pixel 1*1 white with 0,9 of transparency. I have create the pixel in photoshop and when I insert into background of the fancy doesn't appear, the background is empty without error on firebug like image not found or something like that. Here is the css code of fancybox: (the part that I have changed is in #fancybox-outer and #fancybox-content) I have tried background and background-image nothing, help me /* * FancyBox - jQuery Plugin * Simple and fancy lightbox alternative * * Examples and documentation at: http://fancybox.net * * Copyright (c) 2008 - 2010 Janis Skarnelis * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. * * Version: 1.3.4 (11/11/2010) * Requires: jQuery v1.3+ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ #fancybox-loading { position: fixed; top: 50%; left: 50%; width: 40px; height: 40px; margin-top: -20px; margin-left: -20px; cursor: pointer; overflow: hidden; z-index: 1104; display: none; } #fancybox-loading div { position: absolute; top: 0; left: 0; width: 40px; height: 480px; background-image: url('fancybox.png'); } #fancybox-overlay { position: absolute; top: 0; left: 0; width: 100%; z-index: 1100; display: none; } #fancybox-tmp { padding: 0; margin: 0; border: 0; overflow: auto; display: none; } #fancybox-wrap { position: absolute; top: 0; left: 0; padding: 20px; z-index: 1101; outline: none; display: none; } #fancybox-outer { position: relative; width: 100%; height: 100%; background: url(sfondo_fancy.png) repeat-x repeat-y; } #fancybox-content { width: 0; height: 0; padding: 0; outline: none; position: relative; overflow: hidden; z-index: 1102; background: url(sfondo_fancy.png) repeat-x repeat-y; } #fancybox-hide-sel-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 1101; } #fancybox-close { position: absolute; top: -15px; right: -15px; width: 30px; height: 30px; background: transparent url('fancybox.png') -40px 0px; cursor: pointer; z-index: 1103; display: none; } #fancybox-error { color: #444; font: normal 12px/20px Arial; padding: 14px; margin: 0; } #fancybox-img { width: 100%; height: 100%; padding: 0; margin: 0; border: none; outline: none; line-height: 0; vertical-align: top; } #fancybox-frame { width: 100%; height: 100%; border: none; display: block; } #fancybox-left, #fancybox-right { position: absolute; bottom: 0px; height: 100%; width: 35%; cursor: pointer; outline: none; background: transparent url('blank.gif'); z-index: 1102; display: none; } #fancybox-left { left: 0px; } #fancybox-right { right: 0px; } #fancybox-left-ico, #fancybox-right-ico { position: absolute; top: 50%; left: -9999px; width: 30px; height: 30px; margin-top: -15px; cursor: pointer; z-index: 1102; display: block; } #fancybox-left-ico { background-image: url('fancybox.png'); background-position: -40px -30px; } #fancybox-right-ico { background-image: url('fancybox.png'); background-position: -40px -60px; } #fancybox-left:hover, #fancybox-right:hover { visibility: visible; /* IE6 */ } #fancybox-left:hover span { left: 20px; } #fancybox-right:hover span { left: auto; right: 20px; } .fancybox-bg { position: absolute; padding: 0; margin: 0; border: 0; width: 20px; height: 20px; z-index: 1001; } #fancybox-bg-n { top: -20px; left: 0; width: 100%; background-image: url('fancybox-x.png'); } #fancybox-bg-ne { top: -20px; right: -20px; background-image: url('fancybox.png'); background-position: -40px -162px; } #fancybox-bg-e { top: 0; right: -20px; height: 100%; background-image: url('fancybox-y.png'); background-position: -20px 0px; } #fancybox-bg-se { bottom: -20px; right: -20px; background-image: url('fancybox.png'); background-position: -40px -182px; } #fancybox-bg-s { bottom: -20px; left: 0; width: 100%; background-image: url('fancybox-x.png'); background-position: 0px -20px; } #fancybox-bg-sw { bottom: -20px; left: -20px; background-image: url('fancybox.png'); background-position: -40px -142px; } #fancybox-bg-w { top: 0; left: -20px; height: 100%; background-image: url('fancybox-y.png'); } #fancybox-bg-nw { top: -20px; left: -20px; background-image: url('fancybox.png'); background-position: -40px -122px; } #fancybox-title { font-family: Helvetica; font-size: 12px; z-index: 1102; } .fancybox-title-inside { padding-bottom: 10px; text-align: center; color: #333; background: #fff; position: relative; } .fancybox-title-outside { padding-top: 10px; color: #fff; } .fancybox-title-over { position: absolute; bottom: 0; left: 0; color: #FFF; text-align: left; } #fancybox-title-over { padding: 10px; background-image: url('fancy_title_over.png'); display: block; } .fancybox-title-float { position: absolute; left: 0; bottom: -20px; height: 32px; } #fancybox-title-float-wrap { border: none; border-collapse: collapse; width: auto; } #fancybox-title-float-wrap td { border: none; white-space: nowrap; } #fancybox-title-float-left { padding: 0 0 0 15px; background: url('fancybox.png') -40px -90px no-repeat; } #fancybox-title-float-main { color: #FFF; line-height: 29px; font-weight: bold; padding: 0 0 3px 0; background: url('fancybox-x.png') 0px -40px; } #fancybox-title-float-right { padding: 0 0 0 15px; background: url('fancybox.png') -55px -90px no-repeat; } /* IE6 */ .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { height: expression(this.parentNode.clientHeight + "px"); } #fancybox-loading.fancybox-ie6 { position: absolute; margin-top: 0; top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); } #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } /* IE6, IE7, IE8 */ .fancybox-ie .fancybox-bg { background: transparent !important; } .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
0
[ 2, 487, 8190, 93, 12251, 5309, 2395, 29, 40, 1961, 800, 3726, 3726, 31, 259, 111, 20, 5645, 35, 14, 10922, 108, 487, 8190, 93, 227, 12251, 5309, 40, 1961, 97, 410, 5000, 29, 21, 18146, 137, 2483, 165, 359, 29, 713, 15, 518, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get reverse factorial using mysql === While doing my project i need to find the reverse factorial using mysql which i think is the efficient way for query beside doing all recursive thing. and I want to achieve is to find the prime numbers composing an integer. example: for 102, the factorial numbers would be: 17,3,2 Thank you.
0
[ 2, 184, 20, 164, 7006, 3932, 2815, 568, 51, 18, 22402, 800, 3726, 3726, 133, 845, 51, 669, 31, 376, 20, 477, 14, 7006, 3932, 2815, 568, 51, 18, 22402, 56, 31, 277, 25, 14, 8243, 161, 26, 25597, 2113, 845, 65, 302, 24244, 584, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 data in django admin filtering === Hi I have 3 models in my django. Product, Client, and Order. Class Client(models.Model): name = ... .... Class Product(models.Model): name = ... client = models.ForeignKey(Client) ..... Class Order(models.Model): qty = ... created = ... customer_name = ... ... ... client = models.ForeignKey(Client) product = models.ForeignKey(Product) admin.py class OrderAdmin(admin.ModelAdmin): pass admin.site.register(Order, OrderAdmin) the flow of my project is that, I have so many `Clients` and each of them have so many `products`. So when there is an `Order`, I specify the `Clients` and the `product` of the order. my problem is this, in my Admin page, when I add an `Order`, select a particular `client` and when I scroll down the `Product` field, it will show all the lists of `products`. my question is that, is it possible that in admin page,in adding an `Order` when I scroll the `Product`, it will show only the `Product` lists of the `client` that I have selected? and how to do it?
0
[ 2, 4721, 1054, 19, 3857, 14541, 21, 43, 2160, 25272, 800, 3726, 3726, 4148, 31, 57, 203, 2761, 19, 51, 3857, 14541, 9, 2374, 15, 6819, 15, 17, 389, 9, 718, 6819, 5, 13998, 18, 9, 13998, 6, 45, 204, 800, 13, 9, 9, 9, 13, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can i create developer account in Aramex Shipping? === i am trying to create integrate aramex shipping tool in mvc. any one knows , how can i create developer account in Aramex Shipping. http://www.aramex.com/e-commerce/startup.aspx
0
[ 2, 184, 92, 31, 1600, 10058, 2176, 19, 13, 14309, 1706, 7405, 60, 800, 3726, 3726, 31, 589, 749, 20, 1600, 18399, 13, 14309, 1706, 7405, 5607, 19, 307, 8990, 9, 186, 53, 3620, 13, 15, 184, 92, 31, 1600, 10058, 2176, 19, 13, 1430...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
could not able to copy the proxy file using vs2008 powershell === Hi I have written new functionality in the existing webservice. I am copying the proxy file when rebuilding and copying to the specific location i am using powershell but its not working .i get the following error. **The term 'wsdl.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was in cluded, verify that the path is correct and try again. At C:\[path edited for security]\RebuildProxy.ps1:30 char:9 + wsdl.exe <<<< /fields "/l:CS" "/n:$namespace" "/out:$outCSFile" "/urlkey:Tes tEndpoint" "$wsdlUrl"; + CategoryInfo : ObjectNotFound: (wsdl.exe:String) [], CommandNot FoundException + FullyQualifiedErrorId : CommandNotFoundException** After rebuild i get the message the file has been modified outside the source editor[ the generated proxy file already there in the location] could you please help me on this posted below the powershell code param ( [string]$webServiceProjFile = $(throw "webServiceProjFile paramter is required." ), [string]$serviceFile = $(throw "serviceFile parameter is required."), [string]$outCSFile = $(throw "outCSFile paramter is required." ) ) if (! [IO.File]::Exists($webServiceProjFile)) { throw "$webServiceProjFile note found."; } if (! [IO.File]::Exists($outCSFile)) { throw "$outCSFile note found."; } # read the project file into an XML document. $projectFileXml = [xml] (Get-Content $webServiceProjFile ); # access the configured IIS URL $serviceWsdlUrl = [string]::Concat($projectFileXml.Project.ProjectExtensions.VisualStudio.FlavorProperties.WebProjectProperties.IISUrl.Trim(), '/', $serviceFile); $namespace = ""; # Read the namespace for the proxy from the proxy C# file Get-Content $outCSFile | ForEach-Object { if ($_ -match "^\s*namespace\s+([A-Za-z._]+)\s+{\s*$") { $namespace = $matches[1] }}; $wsdlUrl = [string]::Concat("$serviceWsdlUrl", '?wsdl'); # Regenerate the proxy using WSDL.exe wsdl.exe /fields "/l:CS" "/n:$namespace" "/out:$outCSFile" "/urlkey:TestEndpoint" "$wsdlUrl"; # Update the generated C# file so the proxy class interits from WSE2 base class. (Get-Content $outCSFile) | ForEach-Object { $_ -replace "\s+\:\s+System\.Web\.Services\.Protocols\.SoapHttpClientProtocol", " : Microsoft.Web.Services2.WebServicesClientProtocol" } | Set-Content $outCSFile ; $projectDirectory = [IO.Path]::GetDirectoryName($outCSFile); $appConfigFilePath = [IO.Path]::Combine($projectDirectory, "App.config"); (Get-Content $appConfigFilePath) | ForEach-Object { $_ -replace '<add\s+key="TestEndpoint"\s+value="[^"]*"\s+/>', "<add key=""TestEndpoint"" value=""$serviceWsdlUrl"" />" } | Set-Content $appConfigFilePath ;
0
[ 2, 110, 52, 777, 20, 4344, 14, 27188, 3893, 568, 4611, 2753, 414, 15984, 800, 3726, 3726, 4148, 31, 57, 642, 78, 18548, 19, 14, 3149, 2741, 11449, 9, 31, 589, 4344, 68, 14, 27188, 3893, 76, 16633, 17, 4344, 68, 20, 14, 1903, 147...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 JSF1064: Unable to find or serve resource, === In my jsf 2 (primefaces 3) application, I designed and used a page not found (404) for any request that is not match a page. I works fine for all requests except for the jsf resources such as "jquery.js.jsf". When this resource is requested without any query string the application is unable to find it but just return 404 as response status code and never forward the user to the page not found that I've already designed and used. Does anybody know how can I figure this out, so that for JSF resources my application works as the other resources. Best
0
[ 2, 487, 18, 410, 487, 18, 410, 1036, 3470, 45, 2343, 20, 477, 54, 1884, 6577, 15, 800, 3726, 3726, 19, 51, 487, 18, 410, 172, 13, 5, 21108, 6413, 18, 203, 6, 3010, 15, 31, 1006, 17, 147, 21, 2478, 52, 216, 13, 5, 23397, 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...
Outputting list to a "matrix" type format in python === list = ['one', 'two', 'three', 'four', 'five', 'six', 'seven'] Using python, I need list to be displayed as: one, two, three four, five, six seven I need it to be flexible, as the list will change frequently.
0
[ 2, 5196, 1203, 968, 20, 21, 13, 7, 540, 17224, 7, 1001, 2595, 19, 20059, 800, 3726, 3726, 968, 800, 636, 22, 849, 22, 15, 13, 22, 3734, 22, 15, 13, 22, 5642, 22, 15, 13, 22, 4882, 22, 15, 13, 22, 4709, 22, 15, 13, 22, 6742...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Start sort at specified charachter === I am grabbing information from the DB for a form select list. I want the default for the form to be Orange. The form select options are grabbed from the database that is updated by the user ('Colors'). So orange is the only color that starts with 'O' so I figure there has to be a way to start the sort order with a certain char (in this case O). Here is what I have that grabs the colors column from the DB and puts the rows into a form option select. $color_select = mysql_query("SELECT * FROM color"); /* Some stuff here */ echo '<select name="Color" id="color">'; while ($row_item = mysql_fetch_array($color_select)){ $pname = $row_item["color"]; echo "<OPTION value=\"$pname\">$pname</OPTION>"; } echo '</SELECT>'; /* Some stuff here */
0
[ 2, 799, 2058, 35, 9931, 4892, 58, 22529, 800, 3726, 3726, 31, 589, 9910, 676, 37, 14, 13, 9007, 26, 21, 505, 5407, 968, 9, 31, 259, 14, 12838, 26, 14, 505, 20, 44, 2987, 9, 14, 505, 5407, 6368, 50, 2338, 37, 14, 6018, 30, 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...
Can't checkout an android project in STS 2.9.1 and Subversive on Windows 7 === The problem ---------- I have a strange problem with SpringSource Tool Suite 2.9.1 Release and Subversive plugin, running on Windows 7 Home Premium x64. I'm trying to checkout an android project from an SVN repository. Here's what I'm doing: 1. `File > Import > SVN > Project From SVN` 2. I fill in the path to my repository and check the HEAD revision 3. I click `Finish` 4. The project is found and the default option is `Check out as a project with the name specified`. I leave the name alone Set the Depth field to `Recursively` and again, select the HEAD revision. 5. I click `Finish` 6. A progress bar appears for a second just to show an error message: Checkout operation for 'https://(.....)/Android' failed. svn: Cannot create new file 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn\lock': System can not find the path specified When I retry and follow the steps from 1 to 6, another dialog appears. It says: This project already exists in the workspace or there is a data folder in the checkout destination. It allows me to select a folder to overwrite. When I do that, a similar but different error message is shown. It says: Checkout operation for 'https://(...)/Android' failed. 0x0000000f: The folder 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn' is locked by some external process. Please unlock the folder and try to check out the project again. What I've tried ---------- First, I opened the SVN Lock view to see if there were any locks created by the IDE. There were none. I restarted the computer, hoping it would solve the problem of any application locking the file but this does not seem to be the case. After that, I created a new workspace in a different location and tried to check out the project in there. The result was the same. Then, I attempted to change the version of SVN Kit. The situation persists in: 1. SVN Kit 1.2.3 2. SVN Kit 1.3.5 3. Native Java HL 1.5.4 4. Native Java HL 1.6.12 I thought that changing permissions to the directories of my workspace was worth giving a try. It didn't do the trick either. Finally, I checked out the project in a different location, using Tortoise SVN and imported it into my workspace. I could run it (though some build path settings seemed to be missing) but it's not a solution. I can't possibly imagine working on the project simultaneously with a couple of people without the ability to commit/update/view history/resolve conflicts in my IDE. I was advised to install a separate version of eclipse with its own set of tools and a different workspace for this application alone but it doesn't seem like a good idea. I'd like to keep it all in a single IDE. I'd also prefer to avoid reinstalling the whole thing as I don't feel like configuring all the other tools (mostly spring and android-related) from scratch. Has anybody seen a situation like this? How can I get it working?
0
[ 2, 92, 22, 38, 2631, 1320, 40, 13005, 669, 19, 354, 18, 172, 9, 518, 9, 165, 17, 972, 5498, 1284, 27, 1936, 453, 800, 3726, 3726, 14, 1448, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 31, 57, 21, 2578, 1448, 29, 1573, 12097, 5607,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Spring Web Flow request mappings === I am adding Spring Web Flow 2 to a very large existing web application that does not currently use Spring MVC or Web Flow. My task is to have the Web Flow triggered by going to mySite.com/flows, and I am having difficulties. My approach was to set up the DispatcherServlet with mapping of `/flows/*` and map Web Flow to `/flows`. Here is my web.xml where the DispatcherServlet is configured: <servlet> <servlet-name>flow</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/flowContext.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>flow</servlet-name> <url-pattern>/flows/*</url-pattern> </servlet-mapping> I have tried several methods to get the Web Flow to map to `/flows`. My first try was to use a flow-registry with `base-path` setting: <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF/app/flows"> <webflow:flow-location-pattern value="**/*-flow.xml" /> </webflow:flow-registry> My understanding is that this will take the folder structure inside of the `/WEB-INF/app/flows` to create the request mapping. My first test was to add my flow, `booking-flow.xml` inside a subfolder called `booking` (`/WEB-INF/app/flows/booking`). And, great! - it worked as expected. I was able to access the flow from mySite.com/flows/booking. OK, but I don't want `/booking` in the URL, so I moved the `booking-flow.xml` out of the `booking` folder, and straight into `WEB-INF/app/flows` and expected that to work for me, but it did not - I don't think the flow mapped at all. Does anyone know how I can map a flow to the root of the DispatcherServlet mapping, or is there a better way to approach this? I don't want the DispatcherServlet to handle any requests outside of `/flows` in my application. Is it just me, or is there very little documentation available on Spring Web Flow? Thanks!
0
[ 2, 1573, 2741, 3312, 3772, 13305, 18, 800, 3726, 3726, 31, 589, 4721, 1573, 2741, 3312, 172, 20, 21, 253, 370, 3149, 2741, 3010, 30, 630, 52, 871, 275, 1573, 307, 8990, 54, 2741, 3312, 9, 51, 3005, 25, 20, 57, 14, 2741, 3312, 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...
Chrome emulator for iPhone? === I have a mobile site which I developed in ASP.NET and I was wondering if anyone knows of any tools to test this on Chrome in an iPhone / iPad environment? This site has been functioning properly for awhile in every other browser on every other device, however there seem to be issues with it in this browser only on the iPhone / iPad. I just don't know how / if I can debug it somehow. Any help is appreciated. Thanks!
0
[ 2, 13, 12985, 3579, 14868, 26, 21024, 60, 800, 3726, 3726, 31, 57, 21, 3241, 689, 56, 31, 885, 19, 28, 306, 9, 2328, 17, 31, 23, 5712, 100, 1276, 3620, 16, 186, 4672, 20, 1289, 48, 27, 13, 12985, 19, 40, 21024, 13, 118, 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...
Database Design without inheritance === I have a come up with the following schema for a client of mine. Does anything look off here especially the Order Line Items. Should i use inheritance. I'm pretty sure that this site will only allow you to order courses, lessons, and giftcards, and that's it Any feedback would be appreciated ![enter image description here][1] [1]: http://i.stack.imgur.com/9TdoH.png
0
[ 2, 6018, 704, 366, 13852, 800, 3726, 3726, 31, 57, 21, 340, 71, 29, 14, 249, 23874, 26, 21, 6819, 16, 1114, 9, 630, 602, 361, 168, 235, 1118, 14, 389, 293, 3755, 9, 378, 31, 275, 13852, 9, 31, 22, 79, 1772, 562, 30, 48, 689,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
object to array === I need to get an object $resultInput to be viewed as an array (like $resultInput commented out). However when I use the function object to array I get an error Resource id #5. What is the issue? require('dbc.php'); mysql_select_db($db); $resultInput = mysql_query("SHOW COLUMNS FROM about WHERE Field NOT IN ('id', 'created', 'date_modified', 'last_modified', 'update', 'type', 'bodytext') AND Field NOT REGEXP '_image'"); // selects only the columns I want //$resultInput = array('page_header', 'sub_header', 'content', 'content_short'); function objectToArray($object){ if(!is_object($object) && !is_array($object)){ return $object; } if(is_object($object)){ $object = get_object_vars( $object ); } return array_map( 'objectToArray', $object ); } // convert object to array $array = objectToArray( $resultInput ); //show the array print_r( $array );
0
[ 2, 3095, 20, 7718, 800, 3726, 3726, 31, 376, 20, 164, 40, 3095, 5579, 29955, 108, 4881, 20, 44, 6084, 28, 40, 7718, 13, 5, 1403, 5579, 29955, 108, 4881, 5973, 70, 6, 9, 207, 76, 31, 275, 14, 1990, 3095, 20, 7718, 31, 164, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
add description (attribute) to a new polygon and save -> postgres + geoserver + openlayers -> wfs-t insert === actually it is possible to draw a new polygon with openlayers and save it over WFS-T-insert (geoserver wfs-t 1.1.0) in my postgres-db: var save = new OpenLayers.Control.Button({ title: "Save Changes", trigger: function() { if(edit.feature) { edit.selectControl.unselectAll(); } var win = new Ext.Window({ title: 'Beschreibung des Fehlerreports', html:'<br>', html:'Bitte beschreiben Sie den aufgezeigten Fehler in der Darstellung:', layout:'fit', width:500, height: 300, modal: true, autoScroll: true, shadow: false, closable: true, buttons: [ { scope: this, text: 'Speichern', handler: function() { win.hide(); saveStrategy.save(); } },{ scope: this, text: 'Abbrechen', handler: function() { win.hide(); } }] }); win.show(); //alert('saved'); }, displayClass: "olControlSaveFeatures" }); In the saveing-window i need 3 forms to store some information (character) together with the polygon in the DB. This is the structure of the DB and the the published layer from geoserver: DB - Postgres: http://dl.dropbox.com/u/19066498/db.jpg Geoserver - public Layer: http://dl.dropbox.com/u/19066498/geoserver.jpg Any idea what is a possible way to store these informations together with the wfs-t insert post??
0
[ 2, 3547, 5318, 13, 5, 721, 14755, 6, 20, 21, 78, 21309, 17, 2079, 13, 8, 1, 678, 6879, 18, 2754, 6389, 10321, 106, 2754, 368, 15187, 18, 13, 8, 1, 13, 15263, 18, 8, 38, 14692, 800, 3726, 3726, 1121, 32, 25, 938, 20, 2003, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PDF Tags don't show up in tags panel or reading order === I am tagging a small PDF (4pg), and midway through the second page the tags stopped appearing in the tags and the reading order panel after I chose the tag I wanted via TouchUp Reading Order. If I open the content panel, correct containers are created, so i see: - Container <H3>Some text - Container <H3>Some text - Container <H3>Some text - Text: Some Text Does anybody know how to get the three panels synced again?
0
[ 2, 13, 11124, 3383, 18, 221, 22, 38, 298, 71, 19, 3383, 18, 4113, 54, 1876, 389, 800, 3726, 3726, 31, 589, 3383, 2762, 21, 284, 13, 11124, 13, 5, 300, 9623, 6, 15, 17, 13486, 120, 14, 153, 2478, 14, 3383, 18, 1175, 4870, 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...
What is going wrong during web2py form validation? === I have a fairly simple web2py form with a few validators like, IS_FLOAT_IN_RANGE(...) on its fields. When I try to submit the form when it has fields which don't pass validation the form will fail the first validation, but will not report there were any errors. If I then resubmit the same form, validation will fail once again. Worse, if I submit valid information, it will not submit unless I submit the same form twice. The view is simply ``{{=form}}`` The controller looks like this: @auth.requires_login() def addpipelines(): form = FORM(INPUT(_name="type", _value="insert", _type="hidden"), INPUT(_name="project", _value="Project", requires=IS_NOT_EMPTY()), INPUT(_name="value", _value="Value", requires=IS_FLOAT_IN_RANGE(-1e100, 1e100)), BR(), BR(), INPUT(_type="submit", _value="Add"), _method="POST") if request.post_vars.type == "insert" and form.process().accepted: request.post_vars["blub"] = "blargh" return dict(form=form) ```
0
[ 2, 98, 25, 228, 1389, 112, 2741, 135, 6448, 505, 27999, 60, 800, 3726, 3726, 31, 57, 21, 6647, 1935, 2741, 135, 6448, 505, 29, 21, 310, 7394, 9922, 101, 15, 25, 1, 14712, 721, 1, 108, 1, 8366, 5, 9, 9, 9, 6, 27, 82, 2861, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a type-ahead UISearchDisplay with asynchronous network calls in iOS === One view of my iOS application is a UISearchDisplay. I have designed it as a type-ahead search, so that whenever the user enters a new character the table is re-populated. I have done this by implementing the UISearchDisplayDelegate protocol method: searchDisplayController:shouldReloadTableForSearchString: In this method I take the string provided and append it to my query URL. I then create a new NSURLConnection and submit a new asynchronous request. I receive and append data via the delegate method: connection:didReceiveData: Once the connection has finished downloading the data, via the method: connectionDidFinishLoading I pass the data to an instance of NSXMLParser. The data that is receive is an XML file of all the contacts in my database which match the given string. Once the data has finished being parsed I reload the table. **My Problem:** If the user types in text fast enough, there will be multiple connection and parsing tasks going on at the same time. This is an issue because I have one instance of NSMutableData which I append data to and parse. Hopefully you can see where I am going with this. Does anyone have any suggestions for improving my implementation and/or solving this critical-section problem?
0
[ 2, 2936, 21, 1001, 8, 58, 1743, 13, 5661, 25136, 2906, 5438, 29, 21, 16023, 1291, 982, 3029, 19, 13, 7760, 800, 3726, 3726, 53, 1418, 16, 51, 13, 7760, 3010, 25, 21, 13, 5661, 25136, 2906, 5438, 9, 31, 57, 1006, 32, 28, 21, 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...
What kind of widget is this? === I am trying to make a widget exactly like this, ![http://i50.tinypic.com/a476lu.png][1] [1]: http://i.stack.imgur.com/gElwi.png I want mine to be exactly the same (same font, picture, ect). Does anyone know how I can do this? I think it is a wx.ListCtrl but I cant find an example on how to make it look like this. Can you provide me an example on how to make this widget? Thanks.
0
[ 2, 98, 825, 16, 4807, 43, 3060, 25, 48, 60, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 4807, 43, 3060, 1890, 101, 48, 15, 13, 187, 2558, 21127, 6903, 49, 2290, 9, 2864, 93, 7763, 9, 960, 118, 58, 2918, 379, 2377, 9, 306, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Reading Data from Data Grid View === I have fill a datagridview with datasource, my sql querry is in it.I didn't use storedprocedure or anything like that. It displays data well but I couldn't use data from gridview. for example, gridview1.selectedRow.cells[0].Text and similiar methods is not working?Is there anybody can help me about this?
0
[ 2, 1876, 1054, 37, 1054, 7354, 1418, 800, 3726, 3726, 31, 57, 3509, 21, 1054, 16375, 4725, 29, 1054, 12097, 15, 51, 4444, 255, 13, 8190, 622, 25, 19, 32, 9, 49, 223, 22, 38, 275, 8214, 15617, 69, 4221, 54, 602, 101, 30, 9, 32,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I resize a video in an iPhone app === I am developing an iPhone app using phonegap and I need to take and upload a video, which I have done but as the original size is often too large to upload quickly I need to resize the video first. I realise that I need to create a plugin but need some pointers as to how to actually resize the video if indeed it's possible.
0
[ 2, 184, 92, 31, 302, 10454, 21, 763, 19, 40, 21024, 4865, 800, 3726, 3726, 31, 589, 3561, 40, 21024, 4865, 568, 1132, 1136, 306, 17, 31, 376, 20, 247, 17, 71, 8294, 21, 763, 15, 56, 31, 57, 677, 47, 28, 14, 501, 1072, 25, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails OUTER LEFT JOIN === Let's say i have the following models: class Employee < ActiveRecord::Base has_many :shifts end class Shift < ActiveRecord::Base belongs_to :employee end In my controller I want to load all employees including their shifts in a certain date range. But I also want to include employees without any shifts in that range. In my controller I tried: @employees.joins("LEFT OUTER JOIN shifts ON employees.id = shifts.employee_id").where('shifts.starts_at BETWEEN ? and ?', weekBegin, weekEnd).to_json(:include => :shifts) But this still just returns the employees with shifts in that date range. I also want to return employees with no shifts in that date range. How does such a query work?
0
[ 2, 2240, 18, 4896, 225, 1865, 800, 3726, 3726, 408, 22, 18, 395, 31, 57, 14, 249, 2761, 45, 718, 7362, 13, 1, 1348, 14953, 45, 45, 8436, 63, 1, 14842, 13, 45, 14157, 18, 241, 718, 4471, 13, 1, 1348, 14953, 45, 45, 8436, 7034, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to pass a parameter value from rdlc report in web forms project? === i have a rdlc report that is bound to following class: public class Product { DataContext context; public Product() { context = new DataContext(); } public List<Product> GetBoughtItemsForUser(string userName) { //linq query to collect data return query.ToList(); } public string Name {get;set;} public int Quantity {get;set;} } in my rdlc i've set the report dataset to GetBoughtItemsForUser. now i want to pass the userName value which is actually the Page.User.Identity.Name so how should i do this?
0
[ 2, 184, 20, 1477, 21, 18906, 1923, 37, 13, 897, 6109, 1330, 19, 2741, 1997, 669, 60, 800, 3726, 3726, 31, 57, 21, 13, 897, 6109, 1330, 30, 25, 4138, 20, 249, 718, 45, 317, 718, 2374, 13, 1, 1054, 1126, 11969, 4141, 73, 317, 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...
IBAction or [UIButton addTarget:action: forControlEvents:] for UIButton created in .xib file? Which is the better approach? === What is the better approach if we are creating a UIButton in the .xib file using the Interface Builder, is it better to use IBAction method to define its Action Method and the required Control Event, or should we use [UIButton addTarget:action: forControlEvents:] method to define the Action Method? Which approach is better and why?
0
[ 2, 13, 4598, 8645, 54, 636, 5661, 811, 444, 3547, 3958, 3060, 45, 8645, 45, 26, 12898, 4943, 38, 18, 45, 500, 26, 13, 5661, 811, 444, 679, 19, 13, 9, 5845, 220, 3893, 60, 56, 25, 14, 574, 2141, 60, 800, 3726, 3726, 98, 25, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to get name from mysql database with spaces === I have the name in mysql database table like MohanKrishna. How we can search for that name using php with searching like mohan krishna name? please tell me as soon as possible
1
[ 2, 184, 20, 164, 204, 37, 51, 18, 22402, 6018, 29, 7644, 800, 3726, 3726, 31, 57, 14, 204, 19, 51, 18, 22402, 6018, 859, 101, 15803, 27816, 9, 184, 95, 92, 2122, 26, 30, 204, 568, 13, 26120, 29, 5792, 101, 15803, 9261, 204, 60...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
JSONP with Java Server Pages === i read myself a bit into JSONP... but it feels like I am still dumb. I created the following page, which should get the information by my webservice in a JSON notation: <html> <head> <title> SomeHtml Form </title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> function getParameters(){ $.getJSON('http://localhost:8080/test/services/export/getuser.mvc?callback=?',function(res){ alert('Your name is '+res.lname); }); } </script> </head> <body > <button onclick="getParameters();">Get Name</button> </body> </html> I created this with the help of Liams Comment on this topic: http://stackoverflow.com/questions/6809053/simple-jquery-php-and-jsonp-example On the other hand I have a webservice using SPRING and Java Servlets, which gets called by `$.getJSON('http://localhost:8080/test/services/export/getuser.mvc?callback=?',...)` This service looks like this: @RequestMapping("/getuser") public void list(final HttpServletResponse response) { String url = "http://localhost/someProject/someHtml.php?"; User user = getCurrentUser(); JSONObject json = new JSONObject(); json.put("lname", user.getLastName()); json.put("fname", user.getFirstName()); url += "callback=" + json; try { response.sendRedirect(url); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Unfortunately I never get an alert. What did I do wrong?
0
[ 2, 487, 528, 306, 29, 8247, 8128, 4434, 800, 3726, 3726, 31, 1302, 992, 21, 1142, 77, 487, 528, 306, 9, 9, 9, 47, 32, 5121, 101, 31, 589, 174, 9317, 9, 31, 679, 14, 249, 2478, 15, 56, 378, 164, 14, 676, 34, 51, 2741, 11449, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Large Sessions in Rails - Not Stored in local DB === I am making a somewhat large rails app where users fill out a number of forms and in return are quoted for car insurance. The quoting engines are all external, as well as an external DB. I have no need to store a session in a mysql, or similar, DB long-term. What would be the best way to store these sessions. CookieStore is insecure as well as too limited ( <4kb cookie ). Memchached is a possibility except I do not like the idea of key => value pairs, I would like more associative arrays where possible. Any DB related session store is redundant for these needs(?) Some sort of file store system may be the way to go? Please could someone advise on the best way to store the sessions?
0
[ 2, 370, 5763, 19, 2240, 18, 13, 8, 52, 8214, 19, 375, 13, 9007, 800, 3726, 3726, 31, 589, 544, 21, 4131, 370, 2240, 18, 4865, 113, 3878, 3509, 70, 21, 234, 16, 1997, 17, 19, 788, 50, 9591, 26, 349, 4225, 9, 14, 28146, 4016, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to gain access to the closure of a function? === A function in javascript keeps a (hidden) link to its closure. Is it possible to access it programmatically when we have the function (as a variable value) ? A goal could be to list the properties of the closure.
0
[ 2, 25, 32, 938, 20, 3288, 1381, 20, 14, 7790, 16, 21, 1990, 60, 800, 3726, 3726, 21, 1990, 19, 8247, 8741, 8968, 21, 13, 5, 1822, 43, 817, 6, 3508, 20, 82, 7790, 9, 25, 32, 938, 20, 1381, 32, 625, 6732, 1326, 76, 95, 57, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python and Interactive Zoom Plot with Matplotlib === I am using a Matplotlib plot (with Basemap) inside of a wxPython pane. I have got the plot (US map with scatter plot of cities). I am trying to do some interactive zoom capabilities (select a box on the map and "zoom" into that area only). I have managed to get the toolbar to show, but when i click on the buttons, nothing happens. Seems like the toolbar is just there for show. Any Thoughts? Here is my code: # Set up area for plotting Basemap Plot and scatter plot self.figure = Figure(None,dpi=75) self.canvas = FigureCanvas(self.PlotPanel, -1, self.figure) self.axes = self.figure.add_axes([0,0,1,1],frameon=False) self.SetColor( (255,255,255) ) # Toolbar Set up self.toolbar=NavigationToolbar2Wx(self.canvas) self.toolbar.Realize() tw,th = self.toolbar.GetSizeTuple() fw,fh = self.canvas.GetSizeTuple() self.toolbar.SetSize(wx.Size(fw,th)) sizer_7.Add(self.toolbar,0) self.toolbar.update()
0
[ 2, 20059, 17, 9194, 19469, 3798, 29, 4277, 13221, 38, 8326, 800, 3726, 3726, 31, 589, 568, 21, 4277, 13221, 38, 8326, 3798, 13, 5, 1410, 1000, 15022, 6, 572, 16, 21, 619, 396, 6448, 11570, 13, 16660, 9, 31, 57, 330, 14, 3798, 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...
Newline character different than system newline === **My Question:** How do I force an input stream to process line separators as the system standard line separator? I read a file to a string and the newlines get converted to `\n` but my `System.getProperty("line.separator");` is `\r\n`. I want this to be [portable][1], so I want my file reader to read the newlines as the system standard newline character (whatever that may be). How can I force it? Here are my methods from the [Java Helper][2] Library to read the file in as a string. /** * Takes the file and returns it in a string. Uses UTF-8 encoding * * @param fileLocation * @return the file in String form * @throws IOException when trying to read from the file */ public static String fileToString(String fileLocation) throws IOException { InputStreamReader streamReader = new InputStreamReader(new FileInputStream(fileLocation), "UTF-8"); return readerToString(streamReader); } /** * Returns all the lines in the Reader's stream as a String * * @param reader * @return * @throws IOException when trying to read from the file */ public static String readerToString(Reader reader) throws IOException { StringWriter stringWriter = new StringWriter(); char[] buffer = new char[1024]; int length; while ((length = reader.read(buffer)) > 0) { stringWriter.write(buffer, 0, length); } reader.close(); stringWriter.close(); return stringWriter.toString(); } [1]: http://www.javapractices.com/topic/TopicAction.do?Id=38 [2]: http://www.github.com/kentcdodds/Java-Helper
0
[ 2, 78, 1143, 925, 421, 119, 329, 78, 1143, 800, 3726, 3726, 13, 1409, 915, 1301, 45, 1409, 184, 107, 31, 558, 40, 6367, 3766, 20, 953, 293, 1353, 3574, 9922, 28, 14, 329, 1236, 293, 1353, 3574, 3457, 60, 31, 1302, 21, 3893, 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...
Project from 2D to 3D with Three.js === How would I project 2D coordinates on to 3D? For example I have an image (represented as a particle) that is 256px wide. If I pretend this image is centered on the origin (0,0) in 2D space then the vertical sides of the square are located at x = 128 and x = -128. So when this image(particle) is placed in a Three.js scene at the origin(0,0) and the camera is at CamZ distance from the origin, then how do I project the original 2D coordinates to 3D which in tern will tell me the width the image(particle!) appears on screen in three.js units.
0
[ 2, 669, 37, 172, 43, 20, 203, 43, 29, 132, 9, 728, 18, 800, 3726, 3726, 184, 83, 31, 669, 172, 43, 13714, 27, 20, 203, 43, 60, 26, 823, 31, 57, 40, 1961, 13, 5, 28628, 28, 21, 11534, 6, 30, 25, 13, 16910, 306, 396, 1051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CSS styling not working on early Android within subdomain === I've been working on getting a mobile site working for a client, and have encountered an annoying and confusing problem. I have set all CSS sizes for various elements (divs, images, FONTS) to percentages so it works effectively across devices/screen sizes, and throughout testing it has worked perfectly on all devices (iPhone, and a Galaxy I were tested primarily) within a sub-folder www.think-ins.co.uk/mobile/ Problems occur when I have added the site to the domain we actually want to use, which is m.think-ins.co.uk whereby it still works fine on iPhone and a Galaxy Note, but on the old Galaxy I, the styling breaks and i am left with massive font size - even though the code on both the m.think-ins.co.uk subdomain and the think-ins.co.uk/mobile/ folder version is identical. Please help, this is very frustrating!!!
0
[ 2, 272, 18, 18, 23020, 52, 638, 27, 274, 13005, 363, 972, 537, 6232, 800, 3726, 3726, 31, 22, 195, 74, 638, 27, 1017, 21, 3241, 689, 638, 26, 21, 6819, 15, 17, 57, 8208, 40, 17610, 17, 18084, 1448, 9, 31, 57, 309, 65, 272, 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...
I'm trying to create a calculator using JFrame and having some difficulties === Basically it's getting the thing to show up so I can test it and made sure I'm on the right track. This is the code for my main "calculator" file: package simplecalculator; import javax.swing.JFrame; import javax.swing.UIManager; public class Calculator { public static void main(String[] args) { JFrame calculatorFrame = new Listener(); calculatorFrame.setSize(1000, 0x3e8); calculatorFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); calculatorFrame.setVisible(true); } } And I have a separate Listener file for the classes: package simplecalculator; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class Listener extends JFrame { private JLabel enterFirstNumber; private JLabel enterSecondNumber; private JLabel resultLabel; private JTextField getFirstNumber; private JTextField getSecondNumber; private JButton addition; private JButton subtraction; private JButton multiplication; private JButton division; private JPanel panelOne; private JPanel panelTwo; private JPanel panelThree; private static final int frameWidth = 1000; private static final int frameHeight = 1000; int firstNumber; int secondNumber; double finalNumber; public void Calc(){ setSize(frameWidth, frameHeight); enterFirstNumber = new JLabel("Enter First Number: "); getFirstNumber = new JTextField("0", 12); enterSecondNumber = new JLabel("Enter Second Number: "); getSecondNumber = new JTextField("0", 12); } public void buttons() { addition = new JButton("+"); addition.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { firstNumber = Integer.parseInt(getFirstNumber.getText()); secondNumber = Integer.parseInt(getSecondNumber.getText()); finalNumber = firstNumber + secondNumber; resultLabel.setText("" + finalNumber); } }); subtraction = new JButton("-"); subtraction.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { firstNumber = Integer.parseInt(getFirstNumber.getText()); secondNumber = Integer.parseInt(getSecondNumber.getText()); finalNumber = firstNumber - secondNumber; resultLabel.setText("" + finalNumber); } }); multiplication = new JButton("*"); multiplication.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { firstNumber = Integer.parseInt(getFirstNumber.getText()); secondNumber = Integer.parseInt(getSecondNumber.getText()); finalNumber = firstNumber * secondNumber; resultLabel.setText("" + finalNumber); } }); division = new JButton("/"); division.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { firstNumber = Integer.parseInt(getFirstNumber.getText()); secondNumber = Integer.parseInt(getSecondNumber.getText()); finalNumber = firstNumber / secondNumber; resultLabel.setText("" + finalNumber); } }); } private void panels(){ panelOne = new JPanel(); panelOne.setLayout(new GridLayout(2, 2)); panelOne.add(enterFirstNumber); panelOne.add(getFirstNumber); panelOne.add(enterSecondNumber); panelOne.add(getSecondNumber); panelTwo = new JPanel(); panelTwo.setLayout(new GridLayout(2, 2)); panelTwo.add(addition); panelTwo.add(subtraction); panelTwo.add(multiplication); panelTwo.add(division); panelThree = new JPanel(); panelThree.add(resultLabel); } } Basically all I need to know is: 1) Am I on the right track? 2) And how can I get an actual calculator rather than just a blank applet? Sorry if I sound like a noob; I'm a programmin student and I already spent about 12 hours trying to figure this one out.
0
[ 2, 31, 22, 79, 749, 20, 1600, 21, 28539, 568, 487, 8361, 17, 452, 109, 8075, 800, 3726, 3726, 11374, 32, 22, 18, 1017, 14, 584, 20, 298, 71, 86, 31, 92, 1289, 32, 17, 117, 562, 31, 22, 79, 27, 14, 193, 792, 9, 48, 25, 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...
cannot load such file -- devise/schema (LoadError) === After I added the devise_rpx_connectable gem to my Gemfile, I cannot run rails server anymore or migrate to add a column to my Users table. I'm trying to follow the railscast example here: http://railscasts.com/episodes/233-engage-with-devise?view=comments I have tried several things over the last two days to try getting this thing to work. I've tried creating the migration file myself but when I run 'rake db:migrate --trace' the error I get is "rake aborted! cannot load such file -- devise/schema" and a lot of errors underneath starting with: C:/.../devise/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251 in 'require' I have tried googling this question and only found a handful of people with the same issue, none of which had their questions answered. Seems other people with 'cannot load such file' errors were told their versions of certain gems weren't compatible so I'll provide that info here: Gemfile: gem 'rails', '3.2.6' gem 'devise', '2.1.2' gem 'devise_rpx_connectable', '0.2.2' Also my bundler version is 1.1.4 and my ruby version is 1.9.3 The only thing that stands out to me is that the version of ruby in the devise folder seems to be 1.9.1 and mine is 1.9.3 but I would like to know the possible consequences of downgrading to 1.9.1. Any input would be greatly appreciated! Thanks
0
[ 2, 1967, 6305, 145, 3893, 13, 8, 8, 29276, 118, 7526, 540, 13, 5, 8294, 29992, 6, 800, 3726, 3726, 75, 31, 905, 14, 29276, 1, 6952, 396, 1, 25996, 579, 8551, 20, 51, 8551, 16877, 15, 31, 1967, 485, 2240, 18, 8128, 3375, 54, 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...
How do I align selected text in a JTextPane? === relatively self-explaining, How can i center selected text in a JTextPane? (Aligning Any text is helpful)
0
[ 2, 184, 107, 31, 23389, 1704, 1854, 19, 21, 487, 11969, 16660, 60, 800, 3726, 3726, 3109, 1119, 8, 6899, 10792, 68, 15, 184, 92, 31, 459, 1704, 1854, 19, 21, 487, 11969, 16660, 60, 13, 5, 192, 9693, 68, 186, 1854, 25, 15600, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to deserialize the following Json in .Net === [{"post_id":"1347051175_4330674828864","viewer_id":"100002348091122","actor_id":"1347051175","app_id":null,"source_id":"1347051175","created_time":"1341639343","updated_time":"1341756021","target_id":null,"app_data":{"attachment_data":"[]","images":"[4330671268775,4330672108796,4330672788813,4330673148822]","photo_ids":["4330671268775","4330672108796","4330672788813","4330673148822"]},"message":"My Sona sona baby...","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"6","comment_list":[{"fromid":"100000986223584","time":"1341662149","text":"cuty","text_tags":[],"id":"1347051175_4330674828864_5206227","likes":"1","user_likes":false,"post_fbid":"4332356310900"},{"fromid":"100001731888858","time":"1341756021","text":"so so cuteeeeeeeeeee liku u:-)","text_tags":[],"id":"1347051175_4330674828864_5210993","likes":"0","user_likes":false,"post_fbid":"4338952875810"}]}},{"post_id":"100000088581758_468134889866126","viewer_id":"100002348091122","actor_id":"100000088581758","app_id":"350685531728","source_id":"100000088581758","created_time":"1341669978","updated_time":"1341669978","target_id":null,"app_data":{"attachment_data":"[]","images":"[468138666532415,468134869866128,468135849866030,468136973199251,468137469865868,468137783199170]","photo_ids":["468138666532415","468134869866128","468135849866030","468136973199251","468137469865868","468137783199170"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":false,"count":"0","comment_list":[]}},{"post_id":"1639710920_3900655688410","viewer_id":"100002348091122","actor_id":"1639710920","app_id":"350685531728","source_id":"1639710920","created_time":"1341731034","updated_time":"1341763220","target_id":null,"app_data":{"attachment_data":"[]","images":"[3900654328376]","photo_ids":["3900654328376"]},"message":"Looks like chicken legs but its not. Guess what it is????","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"6","comment_list":[{"fromid":"1639710920","time":"1341761665","text":"Stuffed soya chaap.","text_tags":[],"id":"1639710920_3900655688410_2286847","likes":"0","user_likes":false,"post_fbid":"3903015067393"},{"fromid":"100002022637320","time":"1341763220","text":"malai chaap","text_tags":[],"id":"1639710920_3900655688410_2286911","likes":"0","user_likes":false,"post_fbid":"3903086389176"}]}},{"post_id":"551953181_10150941248943182","viewer_id":"100002348091122","actor_id":"551953181","app_id":"350685531728","source_id":"551953181","created_time":"1341665511","updated_time":"1341753392","target_id":null,"app_data":{"attachment_data":"[]","images":"[10150941248893182]","photo_ids":["10150941248893182"]},"message":"Meri bhanji","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"19","comment_list":[{"fromid":"551953181","time":"1341728434","text":"Angpal Singh thanks mausa ji","text_tags":[{"id":"100002528070176","name":"Angpal Singh","type":"user","offset":"0","length":"12"}],"id":"551953181_10150941248943182_6859592","likes":"0","user_likes":false,"post_fbid":"10150942829158182"},{"fromid":"100002059743335","time":"1341753392","text":"soooo cute","text_tags":[],"id":"551953181_10150941248943182_6861025","likes":"0","user_likes":false,"post_fbid":"10150943329803182"}]}},{"post_id":"0_131364133670153","viewer_id":"100002348091122","actor_id":"100001856306429","app_id":null,"source_id":"100001856306429","created_time":"1341759435","updated_time":"1341759435","target_id":null,"app_data":[],"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":false,"count":"0","comment_list":[]}},{"post_id":"100001856306429_131364133670153","viewer_id":"100002348091122","actor_id":"100001856306429","app_id":"2309869772","source_id":"100001856306429","created_time":"1341759435","updated_time":"1341759435","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["438077829560201"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000017724850_321221547970077","viewer_id":"100002348091122","actor_id":"100000017724850","app_id":"2309869772","source_id":"100000017724850","created_time":"1341737869","updated_time":"1341737869","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["438077829560201"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000655391884_491740577518817","viewer_id":"100002348091122","actor_id":"100000655391884","app_id":"2309869772","source_id":"100000655391884","created_time":"1341671475","updated_time":"1341671475","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["438077829560201"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"1347051175_4331011317276","viewer_id":"100002348091122","actor_id":"1347051175","app_id":null,"source_id":"1347051175","created_time":"1341643278","updated_time":"1341643278","target_id":null,"app_data":{"attachment_data":"[]","images":"[4331010717261]","photo_ids":["4331010717261"]},"message":"A Monsoon Evening...","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"0_265124253594181","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":null,"source_id":"100000106651570","created_time":"1341672166","updated_time":"1341672166","target_id":null,"app_data":[],"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":false,"count":"0","comment_list":[]}},{"post_id":"100000106651570_265124253594181","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":"2309869772","source_id":"100000106651570","created_time":"1341672166","updated_time":"1341672166","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["319235411494350"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000655391884_263422937091987","viewer_id":"100002348091122","actor_id":"100000655391884","app_id":"2309869772","source_id":"100000655391884","created_time":"1341671866","updated_time":"1341671866","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["319235411494350"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000655391884_200660360062168","viewer_id":"100002348091122","actor_id":"100000655391884","app_id":"2309869772","source_id":"100000655391884","created_time":"1341671963","updated_time":"1341671963","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["461995660482343"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100001212203977_411423482241388","viewer_id":"100002348091122","actor_id":"100001212203977","app_id":null,"source_id":"100001212203977","created_time":"1341737004","updated_time":"1341741885","target_id":null,"app_data":{"attachment_data":"[]","images":"[411423472241389]","photo_ids":["411423472241389"]},"message":"Karan","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"1","comment_list":[{"fromid":"100003024631105","time":"1341741885","text":"nice pik","text_tags":[],"id":"100001212203977_411423482241388_1141697","likes":"0","user_likes":false,"post_fbid":"411437308906672"}]}},{"post_id":"100000069477133_498859843472831","viewer_id":"100002348091122","actor_id":"100000069477133","app_id":"2309869772","source_id":"100000069477133","created_time":"1341661870","updated_time":"1341661870","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["334746476603597"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"0_243852582400313","viewer_id":"100002348091122","actor_id":"1547472759","app_id":null,"source_id":"1547472759","created_time":"1341654893","updated_time":"1341654893","target_id":null,"app_data":[],"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":false,"count":"0","comment_list":[]}},{"post_id":"1547472759_243852582400313","viewer_id":"100002348091122","actor_id":"1547472759","app_id":"2309869772","source_id":"1547472759","created_time":"1341654893","updated_time":"1341654893","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["392796490780437"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000106651570_437735406258411","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":"2309869772","source_id":"100000106651570","created_time":"1341593783","updated_time":"1341593783","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["392796490780437"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000998028104_420893601287237","viewer_id":"100002348091122","actor_id":"100000998028104","app_id":null,"source_id":"100000998028104","created_time":"1341677767","updated_time":"1341683411","target_id":null,"app_data":{"attachment_data":"[]","images":"[420893584620572]","photo_ids":["420893584620572"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"2","comment_list":[{"fromid":"555950539","time":"1341681381","text":"Where is this?","text_tags":[],"id":"100000998028104_420893601287237_1059757","likes":"0","user_likes":false,"post_fbid":"420909124619018"},{"fromid":"1189811509","time":"1341683411","text":"atttteeeeeeeeention ! :-P","text_tags":[],"id":"100000998028104_420893601287237_1059791","likes":"0","user_likes":false,"post_fbid":"420916467951617"}]}},{"post_id":"100000106651570_251682881610698","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":"2309869772","source_id":"100000106651570","created_time":"1341746858","updated_time":"1341759308","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["280457092028483"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"1","comment_list":[{"fromid":"100001856306429","time":"1341759308","text":"VERMAJI MODI KUCHH DETA HAI KYA MUJHE BHI BATAIYEGA PLESE","text_tags":[],"id":"100000106651570_251682881610698_1008379","likes":"0","user_likes":false,"post_fbid":"251725831606403"}]}},{"post_id":"1547472759_259907264122518","viewer_id":"100002348091122","actor_id":"1547472759","app_id":"2309869772","source_id":"1547472759","created_time":"1341649909","updated_time":"1341715623","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["503962726286479"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"1","comment_list":[{"fromid":"1794176746","time":"1341715623","text":"hahaha.................","text_tags":[],"id":"1547472759_259907264122518_1025162","likes":"0","user_likes":false,"post_fbid":"260165120763399"}]}},{"post_id":"100000106651570_398815820182625","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":"2309869772","source_id":"100000106651570","created_time":"1341671816","updated_time":"1341671816","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["343618472379011"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100000106651570_427667357278326","viewer_id":"100002348091122","actor_id":"100000106651570","app_id":"2309869772","source_id":"100000106651570","created_time":"1341671901","updated_time":"1341759400","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["494473227234171"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"1","comment_list":[{"fromid":"100001856306429","time":"1341759400","text":"I LIKE IT VERMAJI","text_tags":[],"id":"100000106651570_427667357278326_4992865","likes":"0","user_likes":false,"post_fbid":"428132523898476"}]}},{"post_id":"1547472759_390372797690976","viewer_id":"100002348091122","actor_id":"1547472759","app_id":"2309869772","source_id":"1547472759","created_time":"1341757022","updated_time":"1341757022","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["383110208412849"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"1547472759_270036876443960","viewer_id":"100002348091122","actor_id":"1547472759","app_id":"2309869772","source_id":"1547472759","created_time":"1341756868","updated_time":"1341756868","target_id":null,"app_data":{"attachment_data":"[]","images":"[]","photo_ids":["378573172196434"]},"message":"","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"0","comment_list":[]}},{"post_id":"100001117111526_394424087271492","viewer_id":"100002348091122","actor_id":"100001117111526","app_id":null,"source_id":"100001117111526","created_time":"1341663862","updated_time":"1341735699","target_id":null,"app_data":[],"message":"देर बहुत कर दी प्रभु अब तो अवतार लो \n\nप्रजातंत्र पस्त है, नेतृत्व मस्त है \n\nराष्ट्र की दशा पर थोड़ा बिचार लो \n\nअर्थतंत्र देश का जा रहा गड्ढे में \n\nतेरा ही सहारा प्रभु अब तो संभार लो \n\nयुग युग अवतार लिए लोक कल्याण को\n \nजल्दी कुछ करो प्रभु कलयुग के प्लान को \n\nघूसखोर हाकिम है , चोर व्यापारी है \n\nब्लैकमनी मंहगाई कालाबाजारी है \n\nत्राहिमाम त्रहिमाम मची है चारो ओर\n \nअब तो एक एक दिन काटना भी भारी है\n \nघर में लगी है आग घर के चिराग से \n\nजल्दी कुछ करो प्रभु अब तो उबार लो\n \nदेर बहुत कर दी प्रभु अब तो अवतार लो ……….\n-----------------------------------अज्ञात","action_links":null,"impressions":null,"comments":{"can_remove":false,"can_post":true,"count":"3","comment_list":[{"fromid":"100003014876116","time":"1341727813","text":"very nice.","text_tags":[],"id":"100001117111526_394424087271492_4146703","likes":"0","user_likes":false,"post_fbid":"394644480582786"},{"fromid":"100002679838471","time":"1341733906","text":"waah waah","text_tags":[],"id":"100001117111526_394424087271492_4146861","likes":"0","user_likes":false,"post_fbid":"394662590580975"},{"fromid":"100001117111526","time":"1341735699","text":"tx","text_tags":[],"id":"100001117111526_394424087271492_4146911","likes":"0","user_likes":false,"post_fbid":"394667263913841"}]}}]
4
[ 2, 184, 20, 1746, 106, 2815, 2952, 14, 249, 487, 528, 19, 13, 9, 2328, 800, 3726, 3726, 636, 1, 7, 6962, 1, 1340, 7, 45, 7, 1543, 20300, 4246, 15578, 1, 300, 13509, 4167, 3216, 24475, 3470, 7, 15, 7, 4725, 106, 1, 1340, 7, 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...
How to pass viewbag information from Repository === I am moving my crud operations from the controller into a repository. How can I pass the viewbag information from the repository to the controller and then to the view? **My Controller calls PopulateAssigneUserData in the repository** using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Web; using System.Web.Mvc; using WWW.Models; using WWW.DAL; using WWW.ViewModels; namespace WWW.Controllers { public class RolesController : Controller { private Iaspnet_RolesRepository aspnet_RolesRepository; public RolesController() { this.aspnet_RolesRepository = new Aspnet_RolesRepository(new WorldofWarCraftContext()); } public RolesController(Iaspnet_RolesRepository aspnet_RolesRepository) { this.aspnet_RolesRepository = aspnet_RolesRepository; } // // GET: /Roles/Edit/5 public ActionResult Edit(Guid id) { aspnet_Roles aspnet_Role = db.aspnet_Roless .Include(i => i.aspnet_User) .Where(i => i.RoleId == id) .Single(); PopulateAssigneUserData(aspnet_Role); return View(aspnet_Role); } My Repository has the code that used to live in the controller using System; using System.Collections.Generic; using System.Linq; using System.Data; using WWW.Models; using WWW.ViewModels; namespace WWW.DAL { public class Aspnet_RolesRepository : Iaspnet_RolesRepository, Iaspnet_UsersRepository , IDisposable { private WorldofWarCraftContext context; public Aspnet_RolesRepository(WorldofWarCraftContext context) { this.context = context; } public IEnumerable<aspnet_Roles> GetRoles() { return context.aspnet_Roless.ToList(); } public aspnet_Roles GetRolesByID(Guid id) { return context.aspnet_Roless.Find(id); } private void PopulateAssigneUserData(aspnet_Roles aspnet_Role) { var allUsers = context.aspnet_Users; var rolesUsers = new HashSet<Guid>(aspnet_Role.aspnet_User.Select(c => c.UserId)); var viewModel = new List<AssigneUserData>(); foreach (var User in allUsers) { viewModel.Add(new AssigneUserData { UserId = User.UserId, UserName = User.UserName, Assigned = rolesUsers.Contains(User.UserId) }); } ViewBag.Users = viewModel; }
0
[ 2, 184, 20, 1477, 1418, 8632, 676, 37, 24869, 800, 3726, 3726, 31, 589, 1219, 51, 11498, 43, 1311, 37, 14, 9919, 77, 21, 24869, 9, 184, 92, 31, 1477, 14, 1418, 8632, 676, 37, 14, 24869, 20, 14, 9919, 17, 94, 20, 14, 1418, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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# How do I store this type of class relationship in database? === Say I have the following Classes: - EmailAddress - Address - Contact - User - Event - Task - Note Each Contact can have multiple EmailAddresses or multiple Addresses, and Users can also have multiple of each. (Home Address, Business Address or Personal Email, Business Email, etc) I was thinking that maybe I should make the User class extend the Contact class. That would mean that I would have a field in the EmailAddress and Address classes that references the Contact they belong to. Then I would want to be able to attach a note to any of the following types: Event, Task or Contact. I would also want to be able to attach multiple notes to those types. I can't think of a good way to design this structure in the database.
0
[ 2, 272, 5910, 184, 107, 31, 1718, 48, 1001, 16, 718, 1429, 19, 6018, 60, 800, 3726, 3726, 395, 31, 57, 14, 249, 2684, 45, 13, 8, 8517, 27950, 13, 8, 3218, 13, 8, 2203, 13, 8, 4155, 13, 8, 807, 13, 8, 3005, 13, 8, 1945, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can Autofac inject dependencies into layout view files? === I'm trying to inject a dependency into the shared layout view page to avoid having to do it in every view that uses the layout. I've followed the [guidance][1] in the wiki for injecting dependencies into views, but the property is always null. Can Autofac inject properties into a custom view page that is a layout file? Here's my setup. CustomViewPage namespace MyApp { using System.Web.Mvc; public abstract class CustomViewPage : WebViewPage { public IHelper Helper { get; set; } } } ~/Views/Shared/_Layout.cshtml @inherits MyApp.CustomViewPage <!DOCTYPE html> <html> ... @if(this.Helper.HasFoo()){@Html.ActionLink("Bar")} Global Registration... builder.RegisterType<Helper>().AsImplementedInterfaces(); builder.RegisterModelBinderProvider(); builder.RegisterFilterProvider(); builder.RegisterModule(new AutofacWebTypesModule()); builder.RegisterSource(new ViewRegistrationSource()); var container = builder.Build(); DependencyResolver.SetResolver(new AutofacDependencyResolver(container)); The "child" views that use the layout do NOT derive from the CustomViewPage. [1]:http://code.google.com/p/autofac/wiki/Mvc3Integration#View_Page_Injection
0
[ 2, 92, 3108, 1473, 150, 20316, 29411, 77, 9106, 1418, 6488, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 20316, 21, 26835, 77, 14, 2592, 9106, 1418, 2478, 20, 2658, 452, 20, 107, 32, 19, 352, 1418, 30, 2027, 14, 9106, 9, 31, 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...
Image Radio Buttons - NFL Weekly === I've chosen to use this code to construct an application for weekly NFL picks. Can anyone assist in helping me hide the generic radio buttons? I would like to gather all of the picks per individual. HTML <div class="buttons" runat="server"> <input type="radio" name="gp1" id="gpBAL" value="working" /> <label for="gpBAL" class="working"><span>BAL</span></label> <input type="radio" name="gp1" id="gpNC" value="not checked" checked/> <label for="gpNC" class="not_checked"><span>&nbsp;||</span></label> <input type="radio" name="gp1" id="gpWAS" value="faulty" /> <label for="gpWAS" class="faulty"><span>WAS</span></label> </div> CSS body{font-family: helvetica;} input[type="radio"]{ -webkit-appearance:none;} input[type="radio"]+label { background: url('../images/switch.png') repeat-x; float: left; display:Block; } input[type="radio"] + label span { display: block; background: url('../images/switch.png') no-repeat; display: block; line-height: 30px; } input[type="radio"]+label.working span { background-position: left -90px; padding: 0 10px; } input[type="radio"]+label.not_checked span { padding: 0 10px; } input[type="radio"]+label.faulty span { background-position: right -180px; padding: 0 10px; } input[type="radio"]:checked+label { background-position: left -60px; } input[type="radio"]:checked+label.working span { background-position: left -150px; color: white; } input[type="radio"]:checked+label.faulty span { background-position: right -240px; color: white; } input[type="radio"]:checked+label.not_checked { background-position: left -30px; color: white; }
0
[ 2, 1961, 603, 12861, 13, 8, 4101, 3481, 800, 3726, 3726, 31, 22, 195, 2519, 20, 275, 48, 1797, 20, 6960, 40, 3010, 26, 3481, 4101, 13267, 9, 92, 1276, 5404, 19, 3713, 55, 3077, 14, 12733, 603, 12861, 60, 31, 83, 101, 20, 7442, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Check subversion writable access for user === Is there any way to check whether user have writable access to some repository path? What I do now is trying to create directory and then delete it to check whether user has writable access: svn mkdir --username username --password password --message "check whether user username has repository writable access" "svn://localhost:3129/test" svn delete --username username --password password --message "check whether user username has repository writable access" "svn://localhost:3129/test" The problem is that those operations are performed too often as a part of application source code. And, as a result, repository get too many needless commits in case user has writable access. Is there any command similar to `svn checkaccess --username username --password password svn://localhost:3129/test` or any other workarounds so that I would not need to create temporary directory all the time?
0
[ 2, 2631, 972, 10898, 20127, 579, 1381, 26, 4155, 800, 3726, 3726, 25, 80, 186, 161, 20, 2631, 1472, 4155, 57, 20127, 579, 1381, 20, 109, 24869, 2013, 60, 98, 31, 107, 130, 25, 749, 20, 1600, 16755, 17, 94, 27448, 32, 20, 2631, 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...
Porting Android Regular Expression to Black Barry Regular Express not working === I am using this code in Android to validate Password. But now want to use this expression in BB. But it is not working and giving exception **This is Android Code** import java.util.regex.Matcher; import java.util.regex.Pattern; public static boolean isUserPassValid(String userPass) { boolean isValid = false; try { String expression = "^.*(?=.{5,30})(?=.*\\d)(?=.*[a-zA-z]).*"; CharSequence inputStr = userPass; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if (matcher.matches()) { isValid = true; } } catch (Exception e) { Log.e(TAG, "isUserPassValid Message = " + e.toString()); e.printStackTrace(); } return isValid; } **This is BB code that I am trying to validate in Java now** import com.sun.org.apache.regexp.internal.RE; public class Test { /** * @param args */ public static void main(String[] args) { isValidPassword("Arsla"); } public static boolean isValidPassword(String text) { System.out.println(" password for varefication is : " + text); boolean isValid = false; String expression = "^.*(?=.{5,30})(?=.*\\d)(?=.*[a-zA-z]).*$"; String username = text; RE regx = new RE(expression); try { isValid = regx.match(username); System.out.println("password msps to the re " + isValid); } catch (Exception e) { } return isValid; } } **Here is Exception** Exception in thread "main" com.sun.org.apache.regexp.internal.RESyntaxException: Syntax error: Missing operand to closure at com.sun.org.apache.regexp.internal.RECompiler.syntaxError(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.terminal(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.closure(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.branch(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.expr(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.terminal(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.closure(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.branch(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.expr(Unknown Source) at com.sun.org.apache.regexp.internal.RECompiler.compile(Unknown Source) at com.sun.org.apache.regexp.internal.RE.<init>(Unknown Source) at com.sun.org.apache.regexp.internal.RE.<init>(Unknown Source) at Test.isValidPassword(Test.java:19) at Test.main(Test.java:10)
0
[ 2, 1295, 68, 13005, 1290, 1803, 20, 319, 5150, 1290, 2999, 52, 638, 800, 3726, 3726, 31, 589, 568, 48, 1797, 19, 13005, 20, 7394, 1373, 20884, 9, 47, 130, 259, 20, 275, 48, 1803, 19, 13, 3490, 9, 47, 32, 25, 52, 638, 17, 1438,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to handle form post data in a Web Api controller? === In `ASP.NET MVC` , one can access the form post data: var thisData = Request.Form["this.data"]; Is it possible to achieve the same functionality in a `Web API` [ApiController][1]? [1]: http://msdn.microsoft.com/en-us/library/system.web.http.apicontroller%28v=vs.108%29.aspx
0
[ 2, 25, 80, 21, 161, 20, 3053, 505, 678, 1054, 19, 21, 2741, 21, 2159, 9919, 60, 800, 3726, 3726, 19, 13, 1, 472, 306, 9, 2328, 307, 8990, 1, 13, 15, 53, 92, 1381, 14, 505, 678, 1054, 45, 4033, 48, 18768, 800, 3772, 9, 4190, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
making background opague on hover with css, css3 or jquery === What I am trying to achieve is to make the background of the whole page opaque, when I hover on an href. Something that when hovered that will trigger the body class to have a coloured background with opacity. Something like this below, however this does not work. I can only make it work within its contained div. Is there is an easier method with css, or css3. It has to be a light weight method to achieve this. I am also wanting to place an image at the centre of the page. However this functionality is more important for the moment. $(function(){ $('a body').hover(function() { $('a', this).stop().animate({"opacity": 1}); },function() { $('a', this).stop().animate({"opacity": 0.4}); });
0
[ 2, 544, 2395, 13, 11490, 3982, 27, 21350, 29, 272, 18, 18, 15, 272, 18, 18, 240, 54, 487, 8190, 93, 800, 3726, 3726, 98, 31, 589, 749, 20, 4689, 25, 20, 233, 14, 2395, 16, 14, 979, 2478, 29068, 15, 76, 31, 21350, 27, 40, 746...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Infinite scroll plugin doing nothing === I currently have Zend pagination working perfectly fine, and I'm trying to integrate Paul Irish's infinite scroll plugin, but as far as I can tell the plugin is making absolutely no difference. The page controls are still showing up at the bottom of the page, and nothing happens when I scroll down. Here is my javascript: $('#grid').infinitescroll({ navSelector : "div.paginationControl", nextSelector : "#next", itemSelector : "#grid div.entry", debug : true, bufferPx : 200 }); And my pagination controls, taken almost directly from zend's documentation <?php if ($this->pageCount): ?> <div class="paginationControl"> <!-- Previous page link --> <?php if (isset($this->previous)): ?> <a href="<?php echo $this->url(array('page' => $this->previous)); ?>" id="previous"> &lt; Previous </a> | <?php else: ?> <span class="disabled">&lt; Previous</span> | <?php endif; ?> <!-- Numbered page links --> <?php foreach ($this->pagesInRange as $page): ?> <?php if ($page != $this->current): ?> <a href="<?php echo $this->url(array('page' => $page)); ?>"> <?php echo $page; ?> </a> | <?php else: ?> <?php echo $page; ?> | <?php endif; ?> <?php endforeach; ?> <!-- Next page link --> <?php if (isset($this->next)): ?> <a href="<?php echo $this->url(array('page' => $this->next)); ?>" id="next"> Next &gt; </a> <?php else: ?> <span class="disabled">Next &gt;</span> <?php endif; ?> </div> <?php endif; ?> As far as I can tell everything should be set up correctly; grid is the container containing the list of items, entry is the class of each item, I have the plugin included before the script. I'm not getting any javascript errors in the console, but the plugin just isn't having any effect. What could I be doing wrong?
0
[ 2, 9698, 12159, 10922, 108, 845, 626, 800, 3726, 3726, 31, 871, 57, 10526, 43, 19006, 108, 857, 638, 5759, 1123, 15, 17, 31, 22, 79, 749, 20, 18399, 758, 1769, 22, 18, 9698, 12159, 10922, 108, 15, 47, 28, 463, 28, 31, 92, 494, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Differences between PostgreeSQL and MySQL for PHP developers === For a project where most queries on the database will include requirements like "within an polygon" I have come to think about choosing Postgree with PostGIS instead of MySQL, which I have previously mainly used. Mainly because Postgree has more GIS functions. However, I am uncertain how to evaluate this, and also can't really see the difference from a PHP developer perspective. 1. Is Postgree support integrated just as well with PHP as MySQL is? 2. Is writing Postgree queries (SQL) very similar to MySQL? 3. Are there any caveats to consider when choosing Postgree instead of MySQL? 4. Is Postgree per definition the better solution when using GIS data? Hope you guys can help me clarify some of this.
0
[ 2, 4921, 128, 678, 6879, 160, 22402, 17, 51, 18, 22402, 26, 13, 26120, 10168, 800, 3726, 3726, 26, 21, 669, 113, 127, 9386, 2829, 27, 14, 6018, 129, 468, 4786, 101, 13, 7, 1410, 108, 40, 21309, 7, 31, 57, 340, 20, 277, 88, 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...
Why does the interpretation of division operation change among SPARQL processors of Jean and Sesame/OpenRDF? === The following SPARQL query produces different results when run on the SPARQL engines of two popular SDKs ([Jena][1] and [Sesame / OpenRDF][2]): PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> SELECT ?v1 ?v2 ?v3 ?v4 ?v5 ?v6 WHERE { BIND ( 1 / 3 as ?v1) BIND ( xsd:float(1 / 3) as ?v2) BIND ( xsd:float(1) / 3 as ?v3) BIND ( ( 1.0 / 3) as ?v4) BIND ( xsd:float(1.0 / 3) as ?v5) BIND ( xsd:float(1.0) / 3 as ?v6) } the results of the latest version of Jena make sense to me (formatted for readability): v1: 0.333333333333333333333333 v2: "0.333333333333333333333333"^^xsd:float v3: "0.33333334"^^xsd:float v4: 0.333333333333333333333333 v5: "0.333333333333333333333333"^^xsd:float v6: "0.33333334"^^xsd:float on the other hand the latest version of Sesame/OpenRDF returns (formatted for readability): v1: "0"^^<http://www.w3.org/2001/XMLSchema#decimal> v2: "0.0"^^<http://www.w3.org/2001/XMLSchema#float> v3: "0.33333334"^^<http://www.w3.org/2001/XMLSchema#float> v4: "0.3"^^<http://www.w3.org/2001/XMLSchema#decimal> v5: "0.3"^^<http://www.w3.org/2001/XMLSchema#float> v6: "0.33333334"^^<http://www.w3.org/2001/XMLSchema#float> To stress the point: Jena never returns 0 or 0.0 or 0.3 like Sesame/OpenRDF does. Can anybody give an explanation why there is such a difference in numeric results? And how to get the same result to the same SPARQL query? Or, which one is correct (in the sense that implementing the SPARQL standard correctly regardless of mathematical correctness)? [1]: http://jena.apache.org/ [2]: http://www.openrdf.org/
0
[ 2, 483, 630, 14, 6973, 16, 460, 1453, 753, 497, 12196, 22402, 21034, 16, 1907, 17, 26010, 118, 10157, 897, 410, 60, 800, 3726, 3726, 14, 249, 12196, 22402, 25597, 6700, 421, 1736, 76, 485, 27, 14, 12196, 22402, 4016, 16, 81, 844, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 wrap similar classes from different packages === I develop an app for android which uses standard android.database.sqlite.SQLiteDatabase as well as net.sqlcipher.database.SQLiteDatabase. These classes are very similar but I have to duplicate some pieces of code just to handle these different types, even if I need to call the same methods. Can anybody advice what would be the best way to create some wrapper around these classes to have single interface for interaction with both types. Thank you
0
[ 2, 184, 20, 8118, 835, 2684, 37, 421, 16875, 800, 3726, 3726, 31, 2803, 40, 4865, 26, 13005, 56, 2027, 1236, 13005, 9, 18768, 8436, 9, 18, 1251, 10601, 9, 18, 1251, 10601, 18768, 8436, 28, 134, 28, 4275, 9, 18, 22402, 11526, 1694,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Modifications in index.jsp doesn't appear when running the project === This is my `index.jsp` : <!DOCTYPE html> <html> <head><title>Bank application</title> <link rel="stylesheet" href="./css/styles.css" type="text/css"/> </head> <body> <table class="title"> <tr><th>Bank application</th></tr> </table> <br/> <fieldset> <legend>Bank Account Balance</legend> <form action="show-balance"> Customer ID (id001, id002, id003): <input type="text" name="customerId"/><br/> <input type="submit" value="Show Balance"/> </form> </fieldset> <br/> <fieldset> <legend>Random Number</legend> <form action="random-number"> Range: <input type="text" name="range"><br/> <input type="submit" value="Show Number"> </form> </fieldset> <br/> <fieldset> <legend>Registration</legend> <form action="register"> First name: <input type="text" name="firstName"><br> Last name: <input type="text" name="lastName"><br> <input type="submit" value="Register"> </form> </fieldset> <br/> <fieldset> <legend>Prime Number</legend> <form action="find-prime"> Length: <input type="text" name="primeLength"><br> <input type="submit" value="Calculate Prime"> </form> </fieldset> <br/><br/><br/><br/><br/><br/> </body></html> It looks something like this : ![123][1] But when I try to do some modifications to `index.jsp` , for example let's take the last `legend`: <br/> <fieldset> <legend>Prime QQQQQQQQQQQQQQQQQQQQQQQ Number</legend> <form action="find-prime QQQQQQQQQQQQQQQQQQQQQQQ "> Length: <input type="text" name="primeLength"><br> <input type="suQQQQQQQQQQQQQQQQQQQQQQQ bmit" value="Calculate PrimQQQQQQQQQQQQQQQQQQQQQQQ e"> </form> </fieldset> I still get the same page . What's wrong with it ? any idea what am I doing wrong ? Thanks [1]: http://i.stack.imgur.com/At9CY.gif
0
[ 2, 13922, 19, 4348, 9, 728, 3401, 1437, 22, 38, 1893, 76, 946, 14, 669, 800, 3726, 3726, 48, 25, 51, 13, 1, 25671, 9, 728, 3401, 1, 13, 45, 13, 1, 187, 13799, 4474, 13, 15895, 1, 13, 1, 15895, 1, 13, 1, 1743, 1, 22235, 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...
InteropServices.COMException on Access.DoCMD.RunSQL error === I wrote a little program in Visual Studio 2010 to open an access database, enter a value into a table, and open a form. Pretty simple, and the program works great on my laptop. The problem arises when I try and run the exe on a second PC. I cannot enter a value into a table. Both computers can open the project with Visual Studio 2010 just fine. The error I receive when I run it is: > "System.Runtime.InteropServices.COMException (0x800A09C5): The RunSQL > action was canceled.\r\n at > Microsoft.Office.Interop.Access.DoCmd.RunSQL(Object SQLStatement, > Object UseTransaction)\r\n at > OpenGasAlarmSheet.Program.Main(String[] args) in <my file > path>\\Program.cs:line 47" I pass some arguments into a string to get the equivalent of: String sql = "INSERT INTO tbl_LOG ([ALARM], [DATE]) VALUES ('KNITERV4', #07-17-2012 10:22:29 AM#);" And here's the code for part of the program to run that SQL string: Access.Application oAccess = null; oAccess = new Access.Application(); oAccess.OpenCurrentDatabase(<file path to mdb>, false); oAccess.DoCmd.RunSQL(sql); //This is line 47 I've been trying to fix this error for about a week, and I'm completely stuck. Any help would be much appreciated!!! Thanks, Chris
0
[ 2, 1480, 2594, 11449, 18, 9, 960, 10066, 872, 27, 1381, 9, 13799, 79, 43, 9, 3169, 18, 22402, 7019, 800, 3726, 3726, 31, 738, 21, 265, 625, 19, 3458, 1120, 498, 20, 368, 40, 1381, 6018, 15, 2830, 21, 1923, 77, 21, 859, 15, 17,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
incompatible character encodings ruby === I'm getting the following error with my Ruby 1.9 I tried using (as some resources suggested) string.force_encoding('utf-8') But it didn't help! Any ideas how to resolve this? is there a way to eliminate such characters before saving to DB? or is a there a way to make them show? for exemple whene i want to print `Opowieść o kulcie przemocy` i got `Opowie?? o kulcie przemocy` Thanks,
0
[ 2, 19, 20049, 925, 19608, 18, 10811, 800, 3726, 3726, 31, 22, 79, 1017, 14, 249, 7019, 29, 51, 10811, 137, 9, 518, 31, 794, 568, 13, 5, 472, 109, 2566, 2347, 6, 3724, 9, 8774, 1, 219, 15458, 5, 22, 1982, 410, 8, 457, 22, 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...
android - read and show webp images === i know this question is already mentioned on some places (like [here][1]) , but is there an easy way to read webP images , like using a jar file ? it would be great to minimize the size of images of apps even on older devices. [1]: http://stackoverflow.com/questions/7032695/webp-for-android
0
[ 2, 13005, 13, 8, 1302, 17, 298, 2741, 306, 3502, 800, 3726, 3726, 31, 143, 48, 1301, 25, 614, 2211, 27, 109, 1489, 13, 5, 1403, 636, 6836, 500, 2558, 165, 500, 6, 13, 15, 47, 25, 80, 40, 2010, 161, 20, 1302, 2741, 306, 3502, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 AJAX to Rails app causes no error messages to show === When adding :remote => true to my edit form in my rails app, submits work fine, but now my program does not show error messages. I have tried multiple solutions but none of them have worked. Can anyone point me in the correct direction to solve this problem? If the entry is successfully saved, a notice message is added to a div, something I wrote in edit.js.erb. I tried to also have the 'error messages' added to an error message div but @entry.errors.any? never returns true when I add :remote => true. This is the edit div in my form I am trying to update. I also have its contents in a partial and my edit.js.erb tries to update the div with the newly rendered partial, but now @entry.errors.any? is not returning true here anymore.. <div id="errors"> <% if @entry.errors.any? %> <h2><%= pluralize(@entry.errors.count, "error") %> prohibited this entry from being saved:</h2> <ul> <% @entry.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> <% end %> </div>
0
[ 2, 4721, 20624, 20, 2240, 18, 4865, 4047, 90, 7019, 7561, 20, 298, 800, 3726, 3726, 76, 4721, 13, 45, 99, 20209, 800, 1, 1151, 20, 51, 9392, 505, 19, 51, 2240, 18, 4865, 15, 12298, 18, 170, 1123, 15, 47, 130, 51, 625, 630, 52,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to delete a Test Marketplace with Balanced Payments API? === I'm using balanced payments [ruby api][1] and accidentally created a couple of extra test marketplaces. While the api exposes a clear interface for creating a test marketplace, I can't seem to find any way to delete one, even without the api. Anyone know of a method to delete a marketplace? [1]: https://www.balancedpayments.com/docs/ruby
0
[ 2, 25, 32, 938, 20, 27448, 21, 1289, 19408, 29, 13966, 11161, 21, 2159, 60, 800, 3726, 3726, 31, 22, 79, 568, 13966, 11161, 636, 1820, 779, 21, 2159, 500, 2558, 165, 500, 17, 9746, 679, 21, 1335, 16, 2230, 1289, 19408, 18, 9, 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...
Opening Excel files from C# === I have an issue when working with Excel from C# using the Microsoft.Office.Interop.Excel object. The problem comes when I try and open a file to write to that I have already have open in Excel. This ultimately errors and then leaves an instance of Excel running in the background. How can I tell that the file is already open before opening it? Also what is the convention for disposing with the Excel objects and therefore killing the Excel process?
0
[ 2, 1214, 20700, 6488, 37, 272, 5910, 800, 3726, 3726, 31, 57, 40, 1513, 76, 638, 29, 20700, 37, 272, 5910, 568, 14, 7099, 9, 17047, 9, 6280, 2594, 9, 1706, 11040, 3095, 9, 14, 1448, 1624, 76, 31, 1131, 17, 368, 21, 3893, 20, 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...
jsonp for xml-cross domain === I am trying to find a way for xml cross-domain. After searching I found that might be done by jsonp, but I did not get very well the way how it works also after seeing [jsonp with jquery][1] and [Basic how-to for cross domain jsonp][2]. I have a pice of html code like following: <form id="f" name="f" method="POST" action="index.php"> <input type="text" id="t" name="t"> </form> and in javascript part: if( typeof (xmlhttp)=="object") { xmlhttp["open"]("GET",pURL,true); } } where `pURL = index.php?p1="x"&p2="y"` I tried something but it does not work,so I am wondering how I can change the following code to make it correct? <script> $.getJSON("http://domainXYZ.com.indexPHP?jsoncallback=?", { t: "inputValue" }, function(data) { $.each(data, function(data){ alert(data); }); });</script> Any Idea will be appreciated. [1]: http://stackoverflow.com/questions/2681466/jsonp-with-jquery [2]: http://stackoverflow.com/questions/5463256/basic-how-to-for-cross-domain-jsonp
0
[ 2, 487, 528, 306, 26, 23504, 8, 7703, 4603, 800, 3726, 3726, 31, 589, 749, 20, 477, 21, 161, 26, 23504, 919, 8, 537, 6232, 9, 75, 5792, 31, 216, 30, 530, 44, 677, 34, 487, 528, 306, 15, 47, 31, 144, 52, 164, 253, 134, 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...
Create function to execute code === I would not normally use a function to execute code, but my boss is insisting on me using a function instead of an SP to execute SSIS packages. Don't really know why! I need to create a function that will execute the following code and the user only need to provide the SSIS package name when calling the function. declare @cmdtest varchar(200) set @cmdtest = 'dtexec /f "C:\Users\Desktop\testpackage.dtsx"' exec master..xp_cmdshell @cmdtest This code above will execute my testpackage.dtsx, now my function must just ask for the SSIS package name and must be a varchar. Since I am not clued up on functions can someone please show me what the best way of doing this is. I assume a Scalar Function needs to be used?
0
[ 2, 1600, 1990, 20, 15644, 1797, 800, 3726, 3726, 31, 83, 52, 4147, 275, 21, 1990, 20, 15644, 1797, 15, 47, 51, 4054, 25, 24554, 27, 55, 568, 21, 1990, 700, 16, 40, 3782, 20, 15644, 13, 18, 4557, 16875, 9, 221, 22, 38, 510, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Import/export from/to an excel file in .net? === I would like to do both import from and export to, separately. the import would get the data from the excel sheet into a dataset, and the export would do the opposite, from the dataset to the excel file the excel file/book could contain more than one sheet (preferably not through oledb) thanks in advance!
0
[ 2, 184, 107, 31, 9010, 118, 1706, 1993, 37, 118, 262, 40, 20700, 3893, 19, 13, 9, 2328, 60, 800, 3726, 3726, 31, 83, 101, 20, 107, 156, 9010, 37, 17, 7487, 20, 15, 10714, 9, 14, 9010, 83, 164, 14, 1054, 37, 14, 20700, 6125, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
reciving an access token google drive api, c# === I am developing desktop application using Google drive api. I am using c#. at login stage, after login and allow access, I receive authorization code, asking for me to copy paste it to my application for exchanging the authorization code to access token. Is there another way to receive the access token without the user copy and paste the authorization code. Thank in advance Moran
0
[ 2, 13, 15110, 8397, 40, 1381, 20, 2853, 8144, 1493, 21, 2159, 15, 272, 5910, 800, 3726, 3726, 31, 589, 3561, 17404, 3010, 568, 8144, 1493, 21, 2159, 9, 31, 589, 568, 272, 5910, 9, 35, 6738, 108, 876, 15, 75, 6738, 108, 17, 1655,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 I should include reset css to avoid problems with my existing css? === Hello<p>I had this problem: ![]( http://i.imgur.com/Igbww.png ) and to solve it I included reset.css form here - > http://meyerweb.com/eric/tools/css/reset/reset.css <p>Now my site look worse, because some margins are 0, and it look like this: ![]( http://i.imgur.com/34lQT.png ) please. look at the footer - can't change margin and padding, because of reset.css. <p>I tried to include reset.css first, but it didn't help. <p>Question is - how I can solve this ?
0
[ 2, 113, 31, 378, 468, 23422, 272, 18, 18, 20, 2658, 1716, 29, 51, 3149, 272, 18, 18, 60, 800, 3726, 3726, 10975, 1, 306, 1, 49, 41, 48, 1448, 45, 13, 187, 2558, 500, 5, 7775, 6903, 49, 9, 1660, 11147, 9, 960, 118, 49, 11400,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...