unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Notification is still not firing up: === I have my code debugged to the point that there is one "Unused" warning on something minor. The question I have is why is the code not running? Here it is: public class NoteMe extends Activity { /** Called when the activity is first created. */ NotificationManager nm; Context context = this; ImageView iv; TextView title, text; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.note_activity); title = (TextView) findViewById(R.id.title); text = (TextView) findViewById(R.id.text); iv = (ImageView) findViewById(R.id.icon); nm = (NotificationManager) this .getSystemService(Context.NOTIFICATION_SERVICE); long when = System.currentTimeMillis(); RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.note_activity); contentView.setImageViewResource(R.id.image, R.drawable.ic_launcher); contentView.setTextViewText(R.id.title, "Example Title"); contentView.setTextViewText(R.id.text, "HELLO NOTIFICATION!"); Intent notificationIntent = new Intent(this, MainActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); Notification notification = new Notification(); notification.contentIntent = contentIntent; notification.contentView = contentView; notification.flags = Notification.FLAG_ONGOING_EVENT; int NOTIFICATION_ID = 10; nm.notify(NOTIFICATION_ID, notification); } } At present logCat is not working with the phone :(
0
[ 2, 52, 4634, 25, 174, 52, 7139, 71, 45, 800, 3726, 3726, 31, 57, 51, 1797, 121, 2345, 15186, 20, 14, 454, 30, 80, 25, 53, 13, 7, 1020, 8795, 7, 3590, 27, 301, 1689, 9, 14, 1301, 31, 57, 25, 483, 25, 14, 1797, 52, 946, 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...
Implement xs:collapse for @xml:space in XSLT 1.0 === `@xml:space` can be either `default` or `preserve`. XML specifies what the second means but leaves the first up to the application. (I think I have that correct.) So what if the application wants `default` to implement `xs:collapse`? How could XSLT 1.0 actually do this? I think the built-in template for processing text, that is, <xsl:template match="text()"> <xsl:value-of select="."/> </xsl:template> would need to be replaced with something like this pseudo-code: <xsl:choose> <xsl:when test="../@xml:space='preserve'" <xsl:value-of select="."/> </xsl:when> <xsl:otherwise> if position(.)=1 then output LTRIM(value-of(.)) if position(.)=last() the output RTRIM(value-of(.)) otherwise output value-of(.) with interior space normalized and if any combination of these three, then combine as appropriate </xsl:otherwise> </xsl:choose> This input then: <persName> The man is <forename>Edward</forename> <forename>George</forename> <surname type="linked">Bulwer-Lytton</surname>, <roleName>Baron Lytton of <placeName>Knebworth</placeName> </roleName> </persName> would get rendered correctly as `The man is Edward George Bulwer-Lytton, Baron Lytton of Knebworth` with the space before `The man` and after `Knebworth` trimmed and the spaces between `Edward` and `George` collapsed. (The example is from TEI.) Setting `<xsl:strip-space>` on `<persName>` would not work. That would not trim the space before `The man`. Using normalize-space() doesn't work because its three operations -- left-trim, right-trim and middle-normalize -- need to be separated and made position specific. The XSLT 1.0 to implement that pseudo-code would need to be executed for every text node. Wouldn't it be ugly and slow? Bottom line: How does one implement xs:collapse in XSLT 1.0 (with only browser-embedded extensions)? I hope I'm saying all that correctly. And I hope the code is simple. I haven't yet seen how it can be.
0
[ 2, 8713, 993, 18, 45, 7771, 17057, 26, 13, 1, 396, 8184, 45, 5582, 19, 993, 18, 255, 38, 137, 9, 387, 800, 3726, 3726, 13, 1, 396, 8184, 45, 5582, 1, 92, 44, 694, 13, 1, 13862, 9708, 1, 54, 13, 1, 306, 27590, 1, 9, 23504, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dynamic refresh of a composite === I have a tree viewer next to a specialized viewer. When something is selected in the tree viewer, details about this object are shown in the specialized viewer. `TreeViewer tree`, `Composite control`, and `MySpecializedViewer viewer` are instance variables. public TheEverythingViewer(Composite parent) { control = new Composite(parent, SWT.NONE); control.setLayout(new GridLayout(2, false)); tree = new TreeViewer(control); tree.setContentProvider(new MyContentProvider()); tree.setLabelProvider(new MyLabelProvider()); tree.setUseHashlookup(true); tree.getControl().setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, false, true, 1, 1)); tree.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { try { IStructuredSelection sel = (IStructuredSelection) event.getSelection(); MyClass myInput = (MyClass) sel.getFirstElement(); if (viewer != null) if (!viewer.getControl().isDisposed()) viewer.getControl().dispose(); viewer = new MySpecializedViewer(control, table); control.getShell().layout(); } catch (Exception e) { if (viewer != null) if (!viewer.getControl().isDisposed()) viewer.getControl().dispose(); viewer = null; } } }); } Am I doing something wrong? I just want: +--------------+--------------------------------------------+ | + Node | | | - Node | | | + Node | My | | - Node | | | - Node | Specialized | | | Viewer | | | | | | | | | | | | | | | | | | | | | +--------+ | | | | | | | | | | | | | | | | | | +--------+ | | | | | | | | | | | | | +--------------+--------------------------------------------+ The specialized viewer has tables that need to consume more or less space depending on the selected node. And currently, creating a new instance of the specialized viewer is much, much simpler than changing it's input (that wouldn't work ATM).
0
[ 2, 7782, 24905, 16, 21, 12639, 800, 3726, 3726, 31, 57, 21, 1541, 16812, 328, 20, 21, 7119, 16812, 9, 76, 301, 25, 1704, 19, 14, 1541, 16812, 15, 3289, 88, 48, 3095, 50, 1721, 19, 14, 7119, 16812, 9, 13, 1, 8101, 4725, 106, 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...
Phonegap deviceReady not firing === Please excuse me if this is something simple I am overlooking. I am making my first foray into app development using the PhoneGap/Cordova platform, I appear to be stuck at the first hurdle. My deviceReady listener doesn't appear to be firing. My code looks like so: alert('0'); document.addEventListener("deviceready", function(){ alert('1'); db = window.openDatabase("testproject", "1.0", "PhoneGap Test", 200000); alert('2'); if (dbCreated){ alert('3'); db.transaction(getData, transaction_error); } else { alert('4'); db.transaction(populateDB, transaction_error, populateDB_success); } }, false); the initial `alert('0')` (put in to make sure I am actually connecting to the file) is firing but nothing else is happening. In another post on here. Someone else with a similar problem was promted to try `document.addEventListener("deviceready", deviceReadyFunction, true)` which solved the issue for them, but not for me. As a side question, how do you go about debugging javascript and inspecting the clientside databases in PhoneGap development? When developing for the web I obviously have firebug and many other tools, however with PhoneGap dev relying heavily on deviceready which is not triggered by a browser are there any tools I should be aware of? (I am writing my code in Coda but compiling from Xcode).
0
[ 2, 1132, 1136, 306, 3646, 15193, 52, 7139, 800, 3726, 3726, 2247, 6658, 55, 100, 48, 25, 301, 1935, 31, 589, 14237, 9, 31, 589, 544, 51, 64, 26, 3707, 77, 4865, 522, 568, 14, 1132, 1136, 306, 118, 17213, 3496, 2452, 15, 31, 1893...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 call stored procedure without specifying supposedly optional parameter === I'm trying to call a stored procedure with several required and several optional parameters. Before I came along, the beginning of the procedure scripted out like this: USE [MYDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[SP_GetStudents] ( @SortOrder varchar(50), @SortColumn varchar(150), @SortLetter varchar(10), @Status varchar(250), @PageIndex int, @PageSize int, @User_ID int, @Reference_No varchar(50) = NULL, @First_Name varchar(50) = NULL, @Middle_Name varchar(50) = NULL, @Last_Name varchar(50) = NULL ) As BEGIN -- other stuff here Everything seems to work fine. Then I added another parameter to the end: USE [MYDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[SP_GetStudents] ( @SortOrder varchar(50), @SortColumn varchar(150), @SortLetter varchar(10), @Status varchar(250), @PageIndex int, @PageSize int, @User_ID int, @Reference_No varchar(50) = NULL, @First_Name varchar(50) = NULL, @Middle_Name varchar(50) = NULL, @Last_Name varchar(50) = NULL, @ContextID int = NULL ) As BEGIN -- other stuff here and now it's broken. When I use ADO.NET to call the stored proc by setting up a command object with parameters, it throws an exception because I'm not setting the `@ContextID` parameter. Any idea why? I thought if I set it to the default value of `NULL`, then it would effectually be totally optional.
0
[ 2, 92, 22, 38, 645, 8214, 7004, 366, 19077, 68, 11731, 12832, 18906, 800, 3726, 3726, 31, 22, 79, 749, 20, 645, 21, 8214, 7004, 29, 238, 1390, 17, 238, 12832, 12905, 9, 115, 31, 281, 303, 15, 14, 997, 16, 14, 7004, 3884, 69, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Strange behaviours with stringWithFormat float === (lldb) po [NSString stringWithFormat:@"%.1f", 0.01] (id) $21 = 0x003a2560 19991592471028323832250853378750414848.0 (lldb) po [NSString stringWithFormat:@"%.1f", 0.1] (id) $22 = 0x0de92240 -0.0 Does anyone understand the behaviour here? I'm running on device.
0
[ 2, 2578, 7727, 18, 29, 3724, 1410, 23588, 11510, 800, 3726, 3726, 13, 5, 211, 9007, 6, 2353, 636, 2172, 11130, 3724, 1410, 23588, 45, 1, 7, 11881, 9, 165, 410, 7, 15, 713, 9, 3026, 500, 13, 5, 1340, 6, 6439, 165, 800, 713, 396...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 App Engine - set index/home page === from what I understand, the app.yaml file in a Google App Engine project, can serve a file as a 'home' page. When I navigate to my domain, however, it always gives me a 404. My app.yaml is in the war directory. This is what my app.yaml looks like: application: therealtest version: 10 runtime: python api_version: 1 handlers: - url: / static_files: site/index-static.html upload: site/index-static\.html What I am expecting it to do is to display the page index-static.html when I go to the domain of the site, but it does not. Is this not the correct way to do this? Thank you.
0
[ 2, 8144, 4865, 1406, 13, 8, 309, 4348, 118, 8167, 2478, 800, 3726, 3726, 37, 98, 31, 1369, 15, 14, 4865, 9, 8580, 255, 3893, 19, 21, 8144, 4865, 1406, 669, 15, 92, 1884, 21, 3893, 28, 21, 13, 22, 8167, 22, 2478, 9, 76, 31, 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...
About displaying posts from two or more blogs === I want to display posts of two or more blogs in my website now am using **magpierss-0.72** for fetching the posts and my code is require_once('rss_fetch.inc'); $url = 'http://rajs-creativeguys.blogspot.com/feeds/posts/default?alt=rss' /*'http://raghuks.wordpress.com/feed/'*/; $rss = fetch_rss($url); foreach ($rss->items as $i => $item ) { $title = strtoupper ($item['title']); $url = $item['link']; $date = substr($item['pubdate'],0,26); //code to fetch only some text $desc = ''; $max = 30; $arr = explode(' ', strip_tags($item['description'])); $l = count($arr); if($l < $max) $max = $l; for($j=0;$j<$max;++$j) { $desc .= $arr[$j] . ' '; } $desc .= '.....'; echo "<div class=\"blog\"><a target=\"_blank\" href=$url><h1>$title</h1>$desc<br/><br/>DATED : $date <br/><br/></a></div> "; if($i == 3) break; } Here i can specify only one url of feeds and can fetch but now i want to display posts of two or more blogs Please give me the solution Thanks in advance
0
[ 2, 88, 17418, 9868, 37, 81, 54, 91, 8146, 18, 800, 3726, 3726, 31, 259, 20, 3042, 9868, 16, 81, 54, 91, 8146, 18, 19, 51, 2271, 130, 589, 568, 13, 1409, 9473, 20100, 18, 18, 8, 387, 9, 4009, 1409, 26, 18312, 68, 14, 9868, 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...
Aero Toolbar - C# GUI === So, I have a question about GUI in C#... I see <a href="http://i.imgur.com/Nvx6d.png">this</a> image (Can't post image since I'm posting for the first time D:) How to do the toolbar? I've searched around google, no help, and I've messed around in Visual Studio, but failed to do it too >.> Anyone got any idea how to do it? Help is appreciated :D
0
[ 2, 8914, 5607, 1850, 13, 8, 272, 5910, 9457, 800, 3726, 3726, 86, 15, 31, 57, 21, 1301, 88, 9457, 19, 272, 5910, 9, 9, 9, 31, 196, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 49, 9, 1660, 11147, 9, 960, 118, 20763, 396, 379...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drawing images in .NET from another picturebox and keeping sizemode === I'm trying to copy an image from a PictureBox in .NET and draw it on top of another image. How can I retain the sizemode property of the image in the picturebox when I paint it on over the initial image? Thanks in advance...
0
[ 2, 3533, 3502, 19, 13, 9, 2328, 37, 226, 2151, 5309, 17, 2882, 1072, 15570, 800, 3726, 3726, 31, 22, 79, 749, 20, 4344, 40, 1961, 37, 21, 2151, 5309, 19, 13, 9, 2328, 17, 2003, 32, 27, 371, 16, 226, 1961, 9, 184, 92, 31, 820...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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# - check if string contains character and number === How do I check if a string contains the following characters "-A" followed by a number? Ex: thisIsaString-A21 = yes, contains "-A" followed by a number Ex: thisIsaNotherString-AB21 = no, does not contain "-A" followed by a number
0
[ 2, 272, 5910, 13, 8, 2631, 100, 3724, 1588, 925, 17, 234, 800, 3726, 3726, 184, 107, 31, 2631, 100, 21, 3724, 1588, 14, 249, 1766, 13, 7, 8, 58, 7, 709, 34, 21, 234, 60, 1396, 45, 48, 8164, 11130, 8, 58, 1941, 800, 1643, 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...
Update a particular row in a database when a particular button is clicked. php === Okay so for instance say I have a site where users can vote on polls. And lets say that each poll is in the database, and each poll has a unique ID column, as well as a column that stores the question, a column for how many votes yes, and a column for how many votes no. And lets say I have a page where users can go to view polls. So i query the database for all the polls and then loop through them all, printing them to the screen, as well as placing a radio button form next to each one, where you can vote yes/no on the question and then submit. This is where i need help. If i have say hundreds of these polls on the screen, and a user clicks the submit button next to just one, and votes, how can i identify which unique poll i need to update the records for? So i quess what im saying is, how do i associate each poll's id, to its own submit button, so that when a user clicks that specific submit button, i know which poll to update the records for?
0
[ 2, 11100, 21, 1498, 3131, 19, 21, 6018, 76, 21, 1498, 5167, 25, 15802, 9, 13, 26120, 800, 3726, 3726, 1705, 86, 26, 4851, 395, 31, 57, 21, 689, 113, 3878, 92, 2018, 27, 16460, 9, 17, 6884, 395, 30, 206, 4994, 25, 19, 14, 6018,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FlickrJ JavaSE upload photo === Can you explain how can I upload an image without authentication popup or anything from a Desktop Java application. Somehow to get the permission ahead so the user wont have to access any link or anything. I just want a simple application that when I run uploads my photo to the flickr account Thanks
0
[ 2, 12407, 23008, 8247, 870, 71, 8294, 3056, 800, 3726, 3726, 92, 42, 3271, 184, 92, 31, 71, 8294, 40, 1961, 366, 27963, 1675, 576, 54, 602, 37, 21, 17404, 8247, 3010, 9, 3625, 20, 164, 14, 5572, 2173, 86, 14, 4155, 7290, 57, 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...
Android button class returning incorrect value === I am very new to Android development and Java. Have read around but I'm not getting anywhere on this issue. I have a button which when clicked should set a variable A's Value to "Item Purchased". However, I am only get the value used when the variable is first defined in the class. For those learning like me on this - this topic will hopefully make an excellent reference to those just starting. Code is: public class shopView extends Activity { String temp = "temp"; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.shopview); Button btnRef1 = (Button) findViewById(R.id.btnbtnRef11); final TextView ConfirmPurchasetest = (TextView) findViewById(R.id.tvMigName); btnRef1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { temp = "passed value"; ConfirmPurchasetest.setText("item Purchased"); buyFromShop(); Log.v("after button push", "temp"); }; }); } public String buyFromShop(){ Log.v("button push", "after buy from shop"); Log.v("temp variable",temp); return temp; } } and is called using the following: shopcheckout = shop.buyFromShop(); Log.v("Value in myView",shopcheckout); Expected: shopcheckout = "item purchased" Actual: shopcheckout = "temp" Thanks again for any answers. Will actively monitor this post.
0
[ 2, 13005, 5167, 718, 2485, 18867, 1923, 800, 3726, 3726, 31, 589, 253, 78, 20, 13005, 522, 17, 8247, 9, 57, 1302, 140, 47, 31, 22, 79, 52, 1017, 4922, 27, 48, 1513, 9, 31, 57, 21, 5167, 56, 76, 15802, 378, 309, 21, 7612, 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...
Merging Arrays in Clojure === I need to merge a collection of arrays based on id. Example data: {[id:1,region:NA,name:Test1,OS:W] [id:1,region:EU,name:Test2,OS:W] [id:2, region:AS,name:test3,OS:L] [id:2, region:AS,name:test4, OS:M]} Becomes: {[id:1,region:NA|EU,name:Test1|Test2,OS:W] [id:2, region:AS,name:test3|Test4,OS:L,M]} | is the delimiter (changeable) If possible, also would like alphabetical order as well.
0
[ 2, 18842, 7718, 18, 19, 7383, 2142, 99, 800, 3726, 3726, 31, 376, 20, 12666, 21, 1206, 16, 7718, 18, 432, 27, 4924, 9, 823, 1054, 45, 13, 1, 2558, 1340, 45, 165, 15, 18790, 45, 325, 15, 7259, 45, 10543, 165, 15, 759, 45, 499, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Match all URLs exclude jpg,gif,png === I want to match all URLS but exclude image urls from beeing matched with that regex: jpe?g|gif|png . \b(?:https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|$!:,.;]*[A-Z0-9+&@#/%=~_|$](?!jpe?g|gif|png) The problem is that the part with the exclude is not working like this: (?!jpe?g|gif|png) Does anyone have a solution for it? Example: not Matchen: http://example.com/example.jpg http://example.com/example231/example.gif Match: http://example.com/example.html http://example.com/example/?id=4331 http://example.com/example/example/ex_ample/ex-ample/?id=4331
0
[ 2, 730, 65, 13, 911, 7532, 21077, 487, 9623, 15, 263, 821, 15, 306, 2723, 800, 3726, 3726, 31, 259, 20, 730, 65, 13, 911, 7532, 47, 21077, 1961, 13, 911, 7532, 37, 12092, 68, 11265, 29, 30, 7953, 1706, 45, 487, 1664, 60, 263, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Return User to Android App from Browser === I am building a Twitter app that opens a webpage to allow someone to authorize my app. The problem occurs once the user has authenticated the site. It returns me back to my url, from which I'd like to close the browser window to return to my native app. I've tried the following, but the browser window remains open: <script> window.close(); window.self.close(); </script> The users would currently have to go back to the home screen and find my app again. Is there javascript that would return the user to my app? Thanks!
0
[ 2, 788, 4155, 20, 13005, 4865, 37, 16495, 800, 3726, 3726, 31, 589, 353, 21, 10623, 4865, 30, 8965, 21, 2741, 6486, 20, 1655, 737, 20, 1314, 2952, 51, 4865, 9, 14, 1448, 3690, 382, 14, 4155, 63, 14351, 1669, 14, 689, 9, 32, 4815...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adobe Flex Mobile - Camera Compression/Quality === I'm in the process of writing a Flex Mobile app that allows the user to launch the camera, take a photo, and upload it. I used this posting as an example. http://stackoverflow.com/questions/8930199/adobe-flex-mobile-selecting-image-from-camera-roll-or-taking-picture-restarts-th My question is, is there a way to compress or resize the photo as its being (or even after its been) taken? We'd like to get the file sizes down, but so far all I could do was adjust the options in the actual camera settings when I tested it on my Android device. Any ideas?
0
[ 2, 20299, 14409, 3241, 13, 8, 3336, 14864, 118, 15583, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 1174, 21, 14409, 3241, 4865, 30, 2965, 14, 4155, 20, 3394, 14, 3336, 15, 247, 21, 3056, 15, 17, 71, 8294, 32, 9, 31, 147, 48,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Selecting Adjacent Sibling without intervening text nodes === Due to a sad situation I receive HTML like this: <!-- language: lang-html --> <p>Perform the following commands: <code>&gt; cd /foo</code><code>&gt; adb shell</code><code># ps</code> </p> and I need to make code like appear visually like: <!-- language: lang-none --> Perform the following commands: > cd /foo > adb shell # ps I thought I'd be tricky and use the [CSS Adjacent Sibling Selector](http://www.w3.org/TR/CSS2/selector.html#adjacent-selectors): <!-- language: lang-css --> code + code:before { content:'\A'; white-space:pre } ...but then I discovered that this applies even to something like: <!-- language: lang-html --> <p>If you go to your <code>C:\</code> directory and run <code>dir</code> …</p> Is there a CSS-only solution to select adjacent elements **without intervening non-element nodes**? _If and only if there is not, feel free to suggest a JavaScript (including jQuery) solution._
0
[ 2, 20764, 4209, 24792, 366, 27988, 1854, 16272, 800, 3726, 3726, 397, 20, 21, 2950, 1858, 31, 2588, 13, 15895, 101, 48, 45, 13, 1, 187, 8, 8, 816, 45, 4544, 8, 15895, 13, 8, 8, 1, 13, 1, 306, 1, 1432, 4190, 14, 249, 14294, 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...
Dynamicly assigning object keys and values with "for" === here is a simplified problem: I have function SWFUpload_config which has as argument - post_params_arr - "associative array" or object. post_params_arr={"ajaxtask":"swfupload_files", "param": "2012"} I need to read and parse post_params_arr and assign dynamicly keys and values to swfu_settings in the following way: function SWFUpload_config (post_params_arr) { var swfu_settings={ ajaxtask : swfupload_files, param : 2012 } } How can I achieve that? How would I parse post_params_arr inside swfu_settings where I am assigning keys and values? Thank you.
0
[ 2, 7782, 102, 13952, 68, 3095, 5534, 17, 4070, 29, 13, 7, 1106, 7, 800, 3726, 3726, 235, 25, 21, 13, 11268, 1448, 45, 31, 57, 1990, 13, 18, 15263, 576, 8294, 1, 14093, 2816, 56, 63, 28, 5476, 13, 8, 678, 1, 6351, 79, 18, 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 paniate youtube api feed from a specific user -PHP === I want to fetch video feed from a specific user using the youtube api and also be able to paginate the results. Am new to PHP so any sample code to put me on track will be very much appreciated. thanks
0
[ 2, 184, 20, 1809, 15882, 7330, 21, 2159, 4063, 37, 21, 1903, 4155, 13, 8, 26120, 800, 3726, 3726, 31, 259, 20, 18312, 763, 4063, 37, 21, 1903, 4155, 568, 14, 7330, 21, 2159, 17, 67, 44, 777, 20, 19006, 17939, 14, 1736, 9, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Database synchronization - XML or JSON === I write app for android which will be synchronize databases located on android device with external database. In short Android generate some data and store it in own database. From time to time Android send this data through internet to HTTP server. I'm wondering, what will be better to send this data XML or JSON? I know that JSON is much more lighter than XML but do XML any advantage on JSON? What is better to synchronize databases?
0
[ 2, 6018, 13, 16023, 1829, 13, 8, 23504, 54, 487, 528, 800, 3726, 3726, 31, 2757, 4865, 26, 13005, 56, 129, 44, 13, 16023, 2952, 6018, 18, 335, 27, 13005, 3646, 29, 4886, 6018, 9, 19, 502, 13005, 7920, 109, 1054, 17, 1718, 32, 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...
Regex: order matters? === I was trying to strip all non-numeric characters from a phone number. So, suppose we have numbers in this format: "(123) 456-7890". Regex.Replace(phone, @"[ -()]", string.Empty) leaves the dash in. Same with () escaped ("\\(\\)"). This Regex.Replace(phone, @"[() -]", string.Empty) works, though. I thought that order of characters in [] doesn't play a role ? In fact, I get same results if I switch space and dash around.. But brackets have to go first to work ?
0
[ 2, 7953, 1706, 45, 389, 4556, 60, 800, 3726, 3726, 31, 23, 749, 20, 4998, 65, 538, 8, 6336, 14744, 1766, 37, 21, 1132, 234, 9, 86, 15, 5787, 95, 57, 2116, 19, 48, 2595, 45, 13, 7, 5, 918, 240, 6, 13, 26204, 8, 4130, 3165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using multiple content views (XML and canvas) on Android === I am having an issue with using the Canvas to draw my Math equation and text, and haivng text boxes at the bottom of the screen to input data for a result. On my current setup i can have either the buttons and text boxes, or the equation and variable names. Here is my code from the java class package com.soraingraven.suprRef; import java.io.IOException; import java.io.InputStream; import android.app.Activity; import android.content.Context; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Typeface; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.Window; import android.view.WindowManager; public class PerfectGasLaw extends Activity { class RenderView extends View { //For the Text Paint paint; Typeface font; //For the pics Bitmap PGL; public RenderView(Context context) { super(context); paint = new Paint(); //Attempt to load the bitmaps try { AssetManager assetManager = context.getAssets(); InputStream inputStream = assetManager.open("PerfGasLaw.png"); BitmapFactory.Options options = new BitmapFactory.Options(); options.inPreferredConfig = Bitmap.Config.ARGB_4444; PGL = BitmapFactory.decodeStream(inputStream, null, options); inputStream.close(); Log.d("BitmapText", "bobargb8888.png format: " + PGL.getConfig()); } catch (IOException e) { e.printStackTrace(); } finally { //we should really close our input streams here. } } //Drawing text and pics protected void onDraw(Canvas canvas) { paint.setColor(Color.BLUE); paint.setTypeface(font); paint.setTextSize(32); paint.setTextAlign(Paint.Align.LEFT); canvas.drawText("P = Pressure in Atmospheres", 25, 350, paint); canvas.drawText("V = Volume in Liters", 25, 400, paint); canvas.drawText("n = Number of moles", 25, 450, paint); canvas.drawText("R = Gas Constant", 25, 500, paint); canvas.drawText(" - (0.0821 Liter-Atmospheres / K / mole)", 50, 550, paint); canvas.drawText("T = Temperature in K", 25, 600, paint); canvas.drawText("If Constant Pressure - V1/V2 = T1/T2", 25, 650, paint); canvas.drawText("If Constant Temperature - P1/P2 = V2/V1", 25, 700, paint); canvas.drawText("If Constant Volume - P1/P2 = T1/T2", 25, 750, paint); canvas.drawBitmap(PGL, 25, 25, null); invalidate(); } } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setContentView(new RenderView(this)); } } And the XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <EditText android:id="@+id/edit_message" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_weight="1" android:ems="10" android:hint="@string/edit_message" > <requestFocus /> </EditText> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:text="@string/button_send" /> </LinearLayout> Please assist me in doing this. Also if anyone could tell me how to grab the input from a text field like this it would be helpful.
0
[ 2, 568, 1886, 2331, 4146, 13, 5, 396, 8184, 17, 9696, 6, 27, 13005, 800, 3726, 3726, 31, 589, 452, 40, 1513, 29, 568, 14, 9696, 20, 2003, 51, 5057, 8020, 17, 1854, 15, 17, 1458, 3757, 2723, 1854, 8120, 35, 14, 2129, 16, 14, 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...
rollback php - codeignitor === I am new to CI and PHP too. I have a form that which add a company and its contacts to the server including file upload . i need all things on one button click. so function create_company() { $insert = $this->database->insert(); return $insert["insertID"]; //returns the inserted ID } function file_upload() { //upload files if there are some file input selected return $array_of_uploaded_files; } function insert_contacts($company_id,$contacts_array) { //return true if everything success } My problems are 1. **First Company insertion is success,but failed to add its contacts,then i need to delete the current inserted item** 2. **If insert_contact failed i need to delete the uploaded files** So is there any way to roll back actions if one or more of its dependency failed ? I know transactions in Codeignitor ,but how can i use it [with multiple function scope] ? What about file upload ? Please note that i am asking this question because i am new to php , what i can do is that create so many functions and call it on appropriate situations. I just want to know that how can i improve or simplify my codes... Thank you.
0
[ 2, 3001, 1958, 13, 26120, 13, 8, 1797, 9693, 242, 248, 800, 3726, 3726, 31, 589, 78, 20, 5486, 17, 13, 26120, 266, 9, 31, 57, 21, 505, 30, 56, 3547, 21, 237, 17, 82, 11894, 20, 14, 8128, 215, 3893, 71, 8294, 13, 9, 31, 376, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using sizeof in unity cg shader === I'm trying to write a shader for unity using cg, and I'd like to know what accuracy my floats have, but I can't figure out how to use the sizeof command. When I attempt to use it, I get the error: Shader error in 'Relativity/ColorShift': GLSL vertex shader: ERROR: 0:433: 'sizeof' : Reserved word. at line 218 218 is the line that says "CGPROGRAM". Can anyone tell me if there's either a standard size using the arbvp1/arbfp1 profile for a float or how to use the sizeof command?
0
[ 2, 568, 1072, 1041, 19, 8385, 13, 15123, 7546, 139, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 7546, 139, 26, 8385, 568, 13, 15123, 15, 17, 31, 22, 43, 101, 20, 143, 98, 11270, 51, 11510, 18, 57, 15, 47, 31, 92, 22, 38,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android Class Path Error When Build App === I got an problem when build app. The previous time, it is okie! however after update to new ADT and SDK it cause problems. I can not make buit apps from import projects to run any more. Error in class not found for MAIN Activity. Some one please help. Thanks u all! 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.ActivityThread.access$1500(ActivityThread.java:135) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.os.Handler.dispatchMessage(Handler.java:99) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.os.Looper.loop(Looper.java:150) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.ActivityThread.main(ActivityThread.java:4389) 07-05 23:11:08.627: E/AndroidRuntime(18506): at java.lang.reflect.Method.invokeNative(Native Method) 07-05 23:11:08.627: E/AndroidRuntime(18506): at java.lang.reflect.Method.invoke(Method.java:507) 07-05 23:11:08.627: E/AndroidRuntime(18506): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849) 07-05 23:11:08.627: E/AndroidRuntime(18506): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607) 07-05 23:11:08.627: E/AndroidRuntime(18506): at dalvik.system.NativeStart.main(Native Method) 07-05 23:11:08.627: E/AndroidRuntime(18506): Caused by: java.lang.ClassNotFoundException: greengar.brain.tuner2.lite.activity.GameActivity in loader dalvik.system.PathClassLoader[/data/app/greengar.brain.tuner2.lite-1.apk] 07-05 23:11:08.627: E/AndroidRuntime(18506): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 07-05 23:11:08.627: E/AndroidRuntime(18506): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 07-05 23:11:08.627: E/AndroidRuntime(18506): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.Instrumentation.newActivity(Instrumentation.java:1040) 07-05 23:11:08.627: E/AndroidRuntime(18506): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1777) 07-05 23:11:08.627: E/AndroidRuntime(18506): ... 11 more
0
[ 2, 13005, 718, 2013, 7019, 76, 1895, 4865, 800, 3726, 3726, 31, 330, 40, 1448, 76, 1895, 4865, 9, 14, 1158, 85, 15, 32, 25, 13, 17391, 187, 207, 75, 11100, 20, 78, 21, 43, 38, 17, 13, 18, 43, 197, 32, 1679, 1716, 9, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CarrierWave extension_white_list doesn't seem to work === I'm trying to use CarrierWave's `extension_white_list` method: def extension_white_list [/jpe?g/, 'gif', 'png'] end Now whenever I upload anything (even jpegs and pngs), I get a `CarrierWave::IntegrityError` Anyone know what I'm doing wrong?
0
[ 2, 5812, 10134, 3896, 1, 5051, 1, 5739, 1437, 22, 38, 2260, 20, 170, 800, 3726, 3726, 31, 22, 79, 749, 20, 275, 5812, 10134, 22, 18, 13, 1, 1706, 25573, 1, 5051, 1, 5739, 1, 2109, 45, 6312, 3896, 1, 5051, 1, 5739, 636, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to implement memcache for many categories === I am building a web application on google app engine using python and jinja2. I have a website where users can write posts and I have 15 main categories and each of those has 4 divisions. Now I want to implement memcache because I have a 20:1 reader to poster ratio but how can I do it without making 60 different keys? Should I just do it that way? Or should I hit the database and sort the results and have some parameters on the function that gets those results like so: def posts_cache(update = False, category = None, sport = None): key = 'main' posts = memcache.get(key) if posts is None or update: logging.error("DB QUERY") posts = db.GqlQuery("SELECT * " "FROM Post " "ORDER BY created DESC " "LIMIT 100", key) posts = list(posts) memcache.set(key, posts) if category and sport: sportcatlist = [] for post in posts: if post.category == category: if post.sport == sport: sportcatlist.append(post) return sportcatlist elif category: categorylist = [] for post in posts: if post.category == category: categorylist.append(post) return categorylist elif sport: sportlist = [] for post in posts: if post.sport == sport: sportlist.append(post) return sportlist return posts Or is there a more efficient way to do it?
0
[ 2, 184, 20, 8713, 55, 4829, 9616, 26, 151, 6422, 800, 3726, 3726, 31, 589, 353, 21, 2741, 3010, 27, 8144, 4865, 1406, 568, 20059, 17, 5627, 1004, 135, 9, 31, 57, 21, 2271, 113, 3878, 92, 2757, 9868, 17, 31, 57, 357, 407, 6422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Possible to share javascript imports across iframes? === I have a web application that has several iframes that all need to import the same javascript library (eg jquery). Is there a way to only load it once and somehow share that data across all the iframes? I'd rather not have my page load slowly because it is loading the same JS files once for every iframe. Thanks!
0
[ 2, 938, 20, 1891, 8247, 8741, 20617, 464, 31, 8361, 18, 60, 800, 3726, 3726, 31, 57, 21, 2741, 3010, 30, 63, 238, 31, 8361, 18, 30, 65, 376, 20, 9010, 14, 205, 8247, 8741, 1248, 13, 5, 5431, 487, 8190, 93, 6, 9, 25, 80, 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...
In Windows 8 WPF app, is there any UI control which can work with "StartPreviewAsync" of "MediaCapture" class? === I have been developing Windows 8 WPF app and want to preview WebCam. In WinRT, there is straight forward "MediaCapture" class which provides "StartPreviewAsync" function. In Metro style app, there is "CaptureElement" UI control which allows to directly assign MediaCapture to its "Source" property. But in WPF there is not. Any help how can I use MediaCapture facility to preview webcam into WPF app ? I have tried with WPF "MediaElemnet" but couldn't find way to feed "MediCapture's" web cam feed into it. Thanks.
0
[ 2, 19, 1936, 469, 619, 7721, 4865, 15, 25, 80, 186, 13, 5661, 569, 56, 92, 170, 29, 13, 7, 13680, 3515, 4725, 58, 9507, 150, 7, 16, 13, 7, 8260, 4666, 6418, 7, 718, 60, 800, 3726, 3726, 31, 57, 74, 3561, 1936, 469, 619, 7721...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JLabel ImageIcon: stop auto centering in the frame === I have this: import javax.swing.*; import java.awt.Canvas; import java.awt.image.BufferedImage; public class test extends Canvas{ public static JFrame frame; public static int WIDTH = 800; public static int HEIGHT = 600; public static BufferedImage img; public static int[] pixels; public static boolean running=true; public static void main(String[] a){ img = new BufferedImage(WIDTH, HEIGHT,BufferedImage.TYPE_INT_RGB); frame = new JFrame("WINDOWw"); frame.add(new JLabel(new ImageIcon(img))); frame.pack(); frame.setVisible(true); frame.setSize(WIDTH, HEIGHT); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } } How can I stop that black image from auto centering on the frame?
0
[ 2, 487, 21018, 1961, 49, 1126, 45, 747, 3108, 459, 68, 19, 14, 3523, 800, 3726, 3726, 31, 57, 48, 45, 9010, 8247, 396, 9, 18, 3546, 9, 2483, 73, 9010, 8247, 9, 3885, 38, 9, 1245, 8471, 73, 9010, 8247, 9, 3885, 38, 9, 22039, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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's scope within destructor === I am trying to understand Destructor. I got following issue. Here in the below snippet why the object b2 is out of scope for Destructor ? class D { B *b1; public: D() { b1 = new B; B *b2=new B; cout<<"D's Constructor Invoked"<<endl; //delete b2; } ~D() { delete b1; delete b2; // error : undeclared identifier cout<<"D's Destructor Invoked"<<endl; } }; B is just a simple class. Thanks
0
[ 2, 3095, 22, 18, 9914, 363, 13, 20137, 248, 800, 3726, 3726, 31, 589, 749, 20, 1369, 13, 20137, 248, 9, 31, 330, 249, 1513, 9, 235, 19, 14, 1021, 13, 29061, 483, 14, 3095, 334, 135, 25, 70, 16, 9914, 26, 13, 20137, 248, 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...
Finding point on a image in java === I am trying to find the coordinated on the map. I have scrollbar as well. I get the point using the mouselistener but when I change the scrollbar the value of the point changes .. Is there any way i can get the constant value irrespective of the change in the scrollbar.. To have a constant value I tried to get the scrollbar value whihc current scrollbar value-inital scrollbar value. And multiply it by 6 for vertical scrollbar.. Also can anyone tell me, is there a standard value that will be inceased on changing the scrollbar by unit.. int y = mouseY+((sclis.yScrollValue-20)*6); int x = mouseX+(int)((sclis.xScrollValue-50)*16); System.out.println("After add X :: "+ x +" Y ::"+ y); statusBar.setText( String.format( "lat,long ::"+xCoordToLong(x)+"..." +yCoordToLat(y)))
0
[ 2, 3007, 454, 27, 21, 1961, 19, 8247, 800, 3726, 3726, 31, 589, 749, 20, 477, 14, 16681, 27, 14, 2942, 9, 31, 57, 12159, 1850, 28, 134, 9, 31, 164, 14, 454, 568, 14, 7567, 13891, 106, 47, 76, 31, 753, 14, 12159, 1850, 14, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to read a file using a string as a delimiter in C++? === Please find the attached image for the problem statement. [1]: http://i.stack.imgur.com/sgMbd.jpg
1
[ 2, 184, 20, 1302, 21, 3893, 568, 21, 3724, 28, 21, 121, 20565, 106, 19, 272, 20512, 60, 800, 3726, 3726, 2247, 477, 14, 3638, 1961, 26, 14, 1448, 3331, 9, 636, 165, 500, 45, 7775, 6903, 49, 9, 25325, 9, 1660, 11147, 9, 960, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
writing a .csv file - independent of the culture === In German langauage- decimal seperators are , and value seperators are ";" . In English/other languages, decimal seperators are . and values seperators are ",". I want to create a .csv file indepedent of the current culture. I mean always the .csv file should have "." has decimal seperators and "," has value seperators. The code for this given below. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Globalization; namespace CSV_FILE_FORMAT { class Program { static void Main(string[] args) { string aFileName = "result.csv"; FileStream aFileStream = new FileStream(aFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); StreamWriter m_StreamWriter = new StreamWriter(aFileStream); double[] values = new double[] { 10.5, 20.3, 30.2 }; for(int i = 0; i < values.Length;i++) { m_StreamWriter.Write(values[i].ToString(CultureInfo.InvariantCulture)); m_StreamWriter.Write(","); } } } } The problem with this code is if OS is in German. The decimal seperators are shown "," instead of ".". Please let me know the code is missing something.
0
[ 2, 1174, 21, 13, 9, 6824, 710, 3893, 13, 8, 1124, 16, 14, 1365, 800, 3726, 3726, 19, 548, 4544, 1346, 1303, 8, 26380, 10332, 106, 9922, 50, 13, 15, 17, 1923, 10332, 106, 9922, 50, 13, 7, 73, 7, 13, 9, 19, 486, 118, 9539, 255...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
phonegap design is not supported in all version devices === I have developed app in android phonegap.I have **header**, **footer** and 8 **textboxes**.But i am getting different **design** in different **emulator**.Its not correctly fitted in all mobile devices. Please kindly guide me. <!DOCTYPE HTML> <html> <head> <meta name="viewport" content="width=320; user-scalable=no" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta name="inmobi-site-verification" content="d7e348f871ce2cfa2baee7c23da4d1d8"> <title>PhoneGap</title> <script type="text/javascript" charset="utf-8" src="../js/main.js"></script> <link rel="stylesheet" href="../js/master.css" type="text/css" media="screen" title="no title" charset="utf-8"> <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8" src="../js/cordova-1.7.0.js"></script> <script type="text/javascript"> </script> <style type="text/css"> #footer { position:absolute; bottom:0; width:100%; } ul.sidemenu { padding:0; margin:0; list-style:none; font-size:2em; border-top:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-bottom:1px solid #000000; width:260px; border-radius:5px 5px 5px 5px; background-color:#FFFFFF; } .searchbox input { border-top-left-radius: 10px; border-bottom-left-radius: 10px; margin-top:0.2cm; margin-left:1cm; width:70%; height: 32px; float: left; font-size:15pt; padding: 2px; border-top: 4px solid orange; border-bottom: 4px solid orange; border-left: 4px solid orange; } .sea input { border-top-right-radius: 10px; border-bottom-right-radius: 10px; margin-top:0.2cm; background-image: url(sea.PNG); color: #fff; font-weight: bold; width:10%; height: 43px; border: 0; float: left; border-top: 4px solid orange; border-bottom: 4px solid orange; border-right: 4px solid orange; } </style> </head> <body id="body"> <div id="header" style="top;0;width:100%"> <div style="height:10%;border-width:3px;border-height:6px;background-color:#00458D;" align="center"> <h1>Header</h1> </div> </div> <br> <table> <tr> <td></td> <td></td> <td><label style="font-size:12pt">Choose one of the following options to search our directory of causes</label></td> <td></td> <td></td> </tr> </table> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <br/> <br/> <div align="center"> <div class="searchbox"><input type="text" name="searchbox" id="searchbox" placeholder="Search"></div> <div class="sea"><input name="search" type="button" id="btn"></div> </div> <div id="footer" > <div style="height:15%;border-width:3px;border-height:6px;background-color:#00458D;" align="center"> <h3>Footer</h3> </div> </div> </body> </html> My design in Droid emulator ![Droid Emulator][1] Design in Galaxy Tab ![Galaxy Emulator][2] Design in Android 4.2 ![Android 4.2-Emulator][3] [1]: http://i.stack.imgur.com/v0xjq.png [2]: http://i.stack.imgur.com/8JonU.png [3]: http://i.stack.imgur.com/YgiEl.png
0
[ 2, 1132, 1136, 306, 704, 25, 52, 1827, 19, 65, 615, 4690, 800, 3726, 3726, 31, 57, 885, 4865, 19, 13005, 1132, 1136, 306, 9, 49, 57, 13, 1409, 1743, 106, 1409, 15, 13, 1409, 3670, 106, 1409, 17, 469, 13, 1409, 11969, 5309, 160, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 N-Gram Web API === I wish to use Google 2-grams for my project; but the data size renders searching expensive both in terms of speed and storage. Is there a Web-API available for this purpose (in any language) ? The website http://books.google.com/ngrams/graph renders an image, can I get data values?
0
[ 2, 8144, 13, 103, 8, 6295, 2741, 21, 2159, 800, 3726, 3726, 31, 2536, 20, 275, 8144, 172, 8, 6295, 18, 26, 51, 669, 73, 47, 14, 1054, 1072, 16535, 18, 5792, 5381, 156, 19, 1663, 16, 1362, 17, 4326, 9, 25, 80, 21, 2741, 8, 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...
NSString normalization using NFD unicode === In my application i have to normalize an nsstring using NFD unicode system.How can i do this.I need to convert a string which the user entered as normalized and from this normalized string i have to calculate a number.can anyone help me?
0
[ 2, 13, 2172, 11130, 1826, 1829, 568, 13, 11408, 43, 28010, 800, 3726, 3726, 19, 51, 3010, 31, 57, 20, 1826, 2952, 40, 13, 2172, 11130, 568, 13, 11408, 43, 28010, 329, 9, 1544, 92, 31, 107, 48, 9, 49, 376, 20, 8406, 21, 3724, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Core plot: How to hide the plot, axis and labels? === I have a graph with Y and X axises drawn on the default plot space along with the primary plot, and then I have separate plot spaces for auxiliary plots each with their own Y-axes (the X-axis is the same for all plots). I'm implementing buttons to switch the auxiliary plots on and off and I would like this to include basically the whole plot space (plot, custom y-axis, and labels of the custom y-axis). There doesn't seem to be any 'hidden' property for the plot space, and all-tough the plot and the axis both have 'hidden' properties, setting these to 'YES' leaves the axis-labels visible. - What is the best way to completely hide the contents of a plot space without causing more redrawing than necessary? I guess one way could be to remove the plot space and plot from the graph completely, but this feels unintuitive.
0
[ 2, 2884, 3798, 45, 184, 20, 3077, 14, 3798, 15, 8577, 17, 13173, 60, 800, 3726, 3726, 31, 57, 21, 7210, 29, 13, 93, 17, 993, 8577, 160, 3160, 27, 14, 12838, 3798, 726, 303, 29, 14, 1256, 3798, 15, 17, 94, 31, 57, 1725, 3798, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Form tag value in jQuery === document.forms["regform"]["fname"].value; In java script i get the value of input having name("fname") which is in the form having name("regform") by using the above statement. How can i get it in jQuery?? Thanks in advance.
0
[ 2, 505, 3383, 1923, 19, 487, 8190, 93, 800, 3726, 3726, 4492, 9, 4190, 18, 2558, 7, 12463, 4190, 7, 500, 2558, 7, 410, 7259, 7, 500, 9, 15165, 73, 19, 8247, 3884, 31, 164, 14, 1923, 16, 6367, 452, 204, 5, 7, 410, 7259, 7, 6,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQLite and Python. Values write without errors, but not in database once the program is terminated === I experience a problem with Python and SQLite in a script which downloads data from the Internet and puts them into a SQLite database. In the beginning of the execution I open the connection and assign the cursor. This cursor is then sent to the methods which downloads the data and writes them to the database. So far I know the create_schema method is working since the database is created with the correct structure, the other methods seems to be failing, but in the script execute without raising errors. I've tried to go into the database using the sqlite3 termninal tool and select values from the tables, but also a select * returns an empty result. I'm not quite sure how the cursor works with methods, but hopefully posting it here will help me gain a better understanding. Thank in advance for your help. (PS: Sorry about the indentations. I didn't find a good way to do indentations on all text in one go. Any tips on how to do this?) Script: # -*- coding: UTF-8 -*- import sqlite3 import httplib import urllib2 import os from xml.dom import minidom, Node from xml.etree import ElementTree SITE = "http://data.stortinget.no/eksport/" DATA = "data.db" def get_perioder(cur): DOK = "stortingsperioder" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK if page: tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[2] elements = list(top) for el in elements: fra = el.find('{http://data.stortinget.no}fra').text per_id = el.find('{http://data.stortinget.no}id').text til = el.find('{http://data.stortinget.no}til').text print "id: %s fra: %s til: %s" % (per_id, fra, til) cur.execute("""INSERT INTO perioder(fra, id, til) VALUES('%s','%s','%s')""" % (fra, per_id, til)) else: print "Could not load page: "+DOK return cur def get_sesjoner(cur): DOK = "sesjoner" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK if page: tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[2] elements = list(top) for el in elements: fra = el.find('{http://data.stortinget.no}fra').text ses_id = el.find('{http://data.stortinget.no}id').text til = el.find('{http://data.stortinget.no}til').text assert attribute in (fra, ses_id, til) print "id: %s fra: %s til: %s" % (ses_id, fra, til) cur.execute("""INSERT INTO sesjoner(fra, id, til) VALUES(%s, %s, %s)""" % (fra, ses_id, til)) else: print "Could not load page: "+DOK return cur def get_emner(cur): DOK = "emner" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK if not page: print "Could not load page:!! "+DOK return tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[1] elements = list(top) for el in elements: navn = el.find('{http://data.stortinget.no}navn').text main_emne_id = el.find("{http://data.stortinget.no}id").text print "HOVED: %s %s" % (navn, main_emne_id) cur.execute("""INSERT INTO hovedemner(id, navn) VALUES('%s','%s');""" % (main_emne_id, navn)) if("true" in el.find("{http://data.stortinget.no}er_hovedemne").text): for uel in el.find("{http://data.stortinget.no}underemne_liste"): navn = uel.find("{http://data.stortinget.no}navn").text emne_id = uel.find("{http://data.stortinget.no}id").text print "UNDER: %s %s, horer til: %s" % (navn, emne_id, main_emne_id) cur.execute("""INSERT INTO underemner(id, navn, hovedemne_id) VALUES('%s', '%s', '%s');""" % (emne_id, navn, main_emne_id)) return cur def get_fylker(cur): DOK = "fylker" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[1] elements = list(top) for el in elements: fylke_id = el.find("{http://data.stortinget.no}id").text navn = el.find("{http://data.stortinget.no}navn").text print ("id: %s, navn: %s") % (fylke_id, navn) cur.execute("""INSERT INTO fylker(id, navn) VALUES('%s','%s');""" % (fylke_id, navn)) return cur def get_partier(cur): DOK = "allepartier" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[1] elements = list(top) for el in elements: parti_id = el.find("{http://data.stortinget.no}id").text navn = el.find("{http://data.stortinget.no}navn").text print ("id: %s, navn: %s") % (parti_id, navn) cur.execute("""INSERT INTO partier(id, navn) VALUES('%s','%s');""" % (parti_id, navn)) return cur def get_komiteer(cur): DOK = "allekomiteer" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[1] elements = list(top) for el in elements: kom_id = el.find("{http://data.stortinget.no}id").text navn = el.find("{http://data.stortinget.no}navn").text print "id: %s navn: %s" % (kom_id, navn) cur.execute("""INSERT INTO partier(id, navn) VALUES('%s','%s');""" % (kom_id, navn)) return cur def get_representanter(cur): DOK = "dagensrepresentanter" try: page = urllib2.urlopen(SITE+DOK) except: print "Failed to fetch item "+DOK tree = ElementTree.parse(page) root = tree.getroot() top = list(root)[1] elements = list(top) for el in elements: doedsdato = el.find("{http://data.stortinget.no}doedsdato").text etternavn = el.find("{http://data.stortinget.no}etternavn").text foedselsdato = el.find("{http://data.stortinget.no}foedselsdato").text fornavn = el.find("{http://data.stortinget.no}fornavn").text repr_id = el.find("{http://data.stortinget.no}id").text kjoenn = el.find("{http://data.stortinget.no}kjoenn").text fylke = el.find("{http://data.stortinget.no}fylke/{http://data.stortinget.no}id").text parti = el.find("{http://data.stortinget.no}parti/{http://data.stortinget.no}id").text #komiteer = el.find("{http://data.stortinget.no}komiteer_liste/{http://data.stortinget.no}komite/{http://data.stortinget.no}id").text print "repr: %s, %s %s, parti: %s, fylke: %s" % (repr_id, fornavn, etternavn, parti, fylke) cur.execute("""INSERT INTO representanter(doedsdato, etternavn, foedselsdato, fornavn, id, kjoenn, fylke, parti) VALUES('%s','%s','%s','%s','%s','%s','%s','%s');""" % (doedsdato, etternavn, foedselsdato, fornavn, repr_id, kjoenn, fylke, parti)) return cur def create_schema(cur): cur.execute("DROP TABLE IF EXISTS perioder") perioder = "CREATE TABLE perioder(fra varchar(255), id varchar(255), til varchar(255))" cur.execute("DROP TABLE IF EXISTS sesjoner") sesjoner = "CREATE TABLE sesjoner(fra varchar(255), id varchar(255), til varchar(255))" cur.execute("DROP TABLE IF EXISTS hovedemner") hovedemner = "CREATE TABLE hovedemner(id int, navn varchar(255));" cur.execute("DROP TABLE IF EXISTS underemner") underemner = "CREATE TABLE underemner(id int, navn varchar(255), hovedemne_id int)" cur.execute("DROP TABLE IF EXISTS fylker") fylker = "CREATE TABLE fylker(id varchar(255), navn varchar(255));" cur.execute("DROP TABLE IF EXISTS partier") partier = "CREATE TABLE partier(id varchar(255), navn varchar(255));" cur.execute("DROP TABLE IF EXISTS komiteer") komiteer = "CREATE TABLE komiteer(id varchar(255), navn varchar(255));" cur.execute("DROP TABLE IF EXISTS representanter") representanter = "CREATE TABLE representanter(doedsdato varchar(255), etternavn varchar(500), foedselsdato varchar(255), fornavn varchar(500), id varchar(255), kjoenn varchar(255), fylke varchar(255), parti varchar(255));" cur.execute(perioder) cur.execute(sesjoner) cur.execute(hovedemner) cur.execute(underemner) cur.execute(fylker) cur.execute(partier) cur.execute(komiteer) cur.execute(representanter) return cur if __name__ == "__main__": conn = sqlite3.connect(DATA) cur = conn.cursor() cur = create_schema(cur) cur = get_perioder(cur) cur = get_sesjoner(cur) cur = get_emner(cur) cur = get_fylker(cur) cur = get_partier(cur) cur = get_komiteer(cur) cur = get_representanter(cur) conn.close
0
[ 2, 4444, 10601, 17, 20059, 9, 4070, 2757, 366, 11908, 15, 47, 52, 19, 6018, 382, 14, 625, 25, 13780, 800, 3726, 3726, 31, 1496, 21, 1448, 29, 20059, 17, 4444, 10601, 19, 21, 3884, 56, 7121, 18, 1054, 37, 14, 2620, 17, 11179, 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...
NHibernate Linq group by with condition === It seems that NHibernate Linq doesn't understand grouped .Where method conditions. I got the following code: var q = from o in session.Query<OrdreLinjeVerdier>() where o.OrdreLinjeReserve > 0 group o by o.ProduktLager.ProduktLagerID into g select new { ProduktLagerID = g.Key, OrdreRes = g.Sum(x => x.OrdreLinjeReserve), OrdreResUtenSpesial = g.Where(x => x.LeveringsType.LeveringsTypeID == 1).Sum(x => (double?)x.OrdreLinjeReserve) }; And it just goes like this to the database: select ordrelinje0_.ProduktLagerID as col_0_0_, cast(sum(ordrelinje0_.OrdreLinjeReserve) as DECIMAL(19,5)) as col_1_0_, cast(sum(ordrelinje0_.OrdreLinjeReserve) as DOUBLE PRECISION) as col_2_0_ from OrdreLinjeVerdier ordrelinje0_ where ordrelinje0_.OrdreLinjeReserve>@p0 group by ordrelinje0_.ProduktLagerID;@p0 = 0 So basically the condition for g.Where has no effect on the SQL query. It seems like bug or am I missing something?
0
[ 2, 12109, 15191, 8820, 6294, 1251, 214, 34, 29, 2874, 800, 3726, 3726, 32, 2206, 30, 12109, 15191, 8820, 6294, 1251, 1437, 22, 38, 1369, 19511, 13, 9, 2798, 2109, 2039, 9, 31, 330, 14, 249, 1797, 45, 4033, 2593, 800, 37, 635, 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...
Change content div when hover link === For a business website I'm trying to achieve the following: - A div with testimonials from clients. - A list with logos from those clients. When the user hovers over a logo, the correct testimonial should be displayed in the div. I've got the following markup: <div id="testimonial-container"> <div class="testimonial">Here comes a testimonial</div> <div class="testimonial">Here comes another testimonial</div> <div class="testimonial">And another one</div> <ul class="testimonial-logos"> <li><a><img src="logo-1.jpg" /></a></li> <li><a><img src="logo-2.jpg" /></a></li> <li><a><img src="logo-3.jpg" /></a></li> </ul> </div> The hover effect will be done with CSS (opacity:0, and 1), so it isn't really a slider. To add a class to the active testimonial, I use this code: jQuery('#testimonial-container .testimonial-logos a').hover(function(){ jQuery('#testimonial-container .testimonial, #testimonial-container .testimonial-logos a').addClass('active'); });` Any ideas how to switch the testimonials in the div? Thanks in advance!
0
[ 2, 753, 2331, 13, 12916, 76, 21350, 3508, 800, 3726, 3726, 26, 21, 508, 2271, 31, 22, 79, 749, 20, 4689, 14, 249, 45, 13, 8, 21, 13, 12916, 29, 1289, 49, 2111, 2815, 18, 37, 7421, 9, 13, 8, 21, 968, 29, 6449, 18, 37, 273, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Xcode - How to connect XIB to ViewController Class === God, sounds like a silly question :) I created first my TestViewController.h and *.m. Afterwards my TestView.xib. Now I need to tell my xib: "Yes, please take the class TestViewController as my File's Owner". I open up my xib, go to the Identity Inspector of its fileOwner and choose under "Custem Class" TestViewController. But this seems not enough - as when I open up the TestView.xib, and then choose the "Assistent Editor View" it should bring up the corresponding ViewController on the right part of the split screen - in my case the "TestViewController.h". But it doesn't ! Is it necessary to bind the xib in any way to its viewcontroller by dragging lines to files like you do it with outlets and actions? Thanks mogio
0
[ 2, 993, 9375, 13, 8, 184, 20, 6379, 5641, 220, 20, 1418, 12898, 1252, 718, 800, 3726, 3726, 701, 15, 2795, 101, 21, 10752, 1301, 13, 45, 6, 31, 679, 64, 51, 1289, 4725, 12898, 1252, 9, 252, 17, 1637, 9, 79, 9, 4601, 51, 1289, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 we insert items into an SQLite database in a sorted order === I am trying to create an alarm clock in android and i want my Alarm Times to be stored in a sorted order in my Sqlite database so that they can be extracted easily. Is there any default way to do it?? Thanx in advance!
1
[ 2, 184, 92, 95, 14692, 3755, 77, 40, 4444, 10601, 6018, 19, 21, 22554, 389, 800, 3726, 3726, 31, 589, 749, 20, 1600, 40, 6490, 4229, 19, 13005, 17, 31, 259, 51, 6490, 436, 20, 44, 8214, 19, 21, 22554, 389, 19, 51, 4444, 10601, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 delete file using SHFileOperation === I want to delete a file into recycle bin. I using this code. SHFILEOPSTRUCT FileOp; FileOp.hwnd = NULL; FileOp.wFunc=FO_DELETE; FileOp.pFrom= lpFileName; //it's my value \\?\C:\WorkFolder\qweqw.docx FileOp.pTo = NULL; FileOp.fFlags=FOF_ALLOWUNDO|FOF_NOCONFIRMATION; FileOp.hNameMappings=NULL; int t_res = SHFileOperation(&FileOp); // t_res = 124 return t_res; What's i doing wrong? Thanks in advance.
0
[ 2, 31, 92, 22, 38, 27448, 3893, 568, 5527, 16877, 11377, 800, 3726, 3726, 31, 259, 20, 27448, 21, 3893, 77, 302, 12467, 4511, 9, 31, 568, 48, 1797, 9, 5527, 16877, 2594, 10346, 3893, 2594, 73, 3893, 2594, 9, 252, 6156, 43, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tracks don't show in Spotify-Playlist-View === I'm using the default playlist object from the JS-Spotify library and constructing a playlist. Then I use this Code: var playlistList = new views.List(pl); playlistList.node.classList.add('sp-light'); $(".favAlbums").append(playlistList.node); But for the first time when I load the page with this view the tracks don't show in the playlist DIV. The playlist DIV itself does. What could cause that? (I'm using exactly the same code at a different place where it works just perfectly)
0
[ 2, 1633, 221, 22, 38, 298, 19, 1999, 8612, 8, 5438, 5739, 8, 4725, 800, 3726, 3726, 31, 22, 79, 568, 14, 12838, 27063, 3095, 37, 14, 487, 18, 8, 18, 4296, 8612, 1248, 17, 18660, 21, 27063, 9, 94, 31, 275, 48, 1797, 45, 4033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Solr: copy multi-valued field to single-valued field === I am working with Solr to do a predictive search. I have a multi-valued field containing the characteristics of a product (i.e: "blue", "250 GB hard drive", "12cm wide", etc) I need to have them all together in one field separated by a whitespace: "blue 250 GB hard drive 12cm wide" Is that possible with the copyfield?? If the answer is no, how shall I do it?? thank you!!!
0
[ 2, 7176, 139, 45, 4344, 1889, 8, 15165, 43, 575, 20, 345, 8, 15165, 43, 575, 800, 3726, 3726, 31, 589, 638, 29, 7176, 139, 20, 107, 21, 9584, 1284, 2122, 9, 31, 57, 21, 1889, 8, 15165, 43, 575, 3503, 14, 5626, 16, 21, 2374, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add a fixed value in a list containing binded items === I've an enumerable providing a variable data set of values. The values are generated while runtime from the user. These values are bound to an ItemsSource of a ListBox public IEnumerable<string> Items { get { return list; } // list is here a dummy; it does not actually exists } listbox.SetBinding(ListBox.ItemsSourceProperty, new Binding { Source = Items }); Now I want to add one fixed item at the beginning. But e.g. `lb.Items.Add("abc");` will break runtime. Same for the insert method. // listbox.Items.Add("abc"); // listbox.Items.Insert(0, "abc"); How do I add a fixed item at the beginning?
0
[ 2, 184, 20, 3547, 21, 3535, 1923, 19, 21, 968, 3503, 10193, 69, 3755, 800, 3726, 3726, 31, 22, 195, 40, 1957, 723, 106, 579, 2674, 21, 7612, 1054, 309, 16, 4070, 9, 14, 4070, 50, 6756, 133, 485, 891, 37, 14, 4155, 9, 158, 4070...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OTF version of DejaVu fonts === I have a requirement to use the DejaVu fonts with an application that only supports OTF format fonts. I've tried the free online font converters like www.freefontconverter.com/ and onlinefontconverter.com/ and while they come back with an OTF file, it does not seem valid. How can I make this work?
0
[ 2, 635, 11720, 615, 16, 121, 1004, 8924, 9978, 18, 800, 3726, 3726, 31, 57, 21, 8981, 20, 275, 14, 121, 1004, 8924, 9978, 18, 29, 40, 3010, 30, 104, 6747, 635, 11720, 2595, 9978, 18, 9, 31, 22, 195, 794, 14, 551, 2087, 9978, 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...
SSL Certificate "Issued by" modified by server === We have a .Net application that connects to web services on servers that we host, and we have SSL certificates bound to https/443 on those servers. Sometimes these SSL certificates are self-signed, so we're not relying entirely on the X509Certificate2.Verify() method and the SslPolicyErrors.None enum within the method that we've programmed for ServicePointManager.ServerCertificateValidationCallback, because our certs aren't always valid. We have a secondary step that checks the signature of the hash string (X509Certificate.GetCertHashString()) and compares it against a list of "approved" certificates. This way we can return a true for the callback if it's a known certificate. In one of our installation sites, we're getting a different hash string when connecting to precisely the same web server. After printing out to a log file every property on the X509Certificate object, I found that the "Issued By" value is different when they connect. Something along the way from their users' workstations out to their network hardware, and then off to our server, is modifying the certificate. When our application validates the certificate, first of all it's not a trusted authority anymore, and second when it checks the hash string, it's not on the approved list (changing the issuer seems to change the hash). Can anyone provide any ideas on how they're doing this? Furthermore, any idea how to do that programmatically in .Net? Thanks, Dan
0
[ 2, 13, 18, 18, 255, 6259, 13, 7, 12565, 43, 34, 7, 5372, 34, 8128, 800, 3726, 3726, 95, 57, 21, 13, 9, 2328, 3010, 30, 8534, 20, 2741, 687, 27, 17595, 30, 95, 2015, 15, 17, 95, 57, 13, 18, 18, 255, 6259, 18, 4138, 20, 7775...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to run python programs from command promt on windows? === Ok so I got python to run in command prompt I just can't figure out the syntax to call scripts from it. So my file is in c:\python\script so I've been calling like this; "C:\Python\Script" but it doesn't anything and returns ""File<stdin>", line 1"
0
[ 2, 184, 20, 485, 20059, 1726, 37, 1202, 11443, 38, 27, 1936, 60, 800, 3726, 3726, 5854, 86, 31, 330, 20059, 20, 485, 19, 1202, 11443, 4417, 31, 114, 92, 22, 38, 1465, 70, 14, 22649, 20, 645, 17505, 37, 32, 9, 86, 51, 3893, 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...
pyQT dialog foxus when called from JS+Python === I've HTML window with button that calls python function that loads PyQT Dialog. My Problem: my nice Dialog appears behind the HTML window and user should move the HTML window in order to use the PyQT GUI. Where should I define, and how do I define the Dialog (PyQT) to be above the HTML window? Thanks! Wish you all a great day. Dolphinet
0
[ 2, 7103, 1251, 38, 28223, 2385, 267, 76, 227, 37, 487, 18, 2430, 6448, 11570, 800, 3726, 3726, 31, 22, 195, 13, 15895, 1463, 29, 5167, 30, 3029, 20059, 1990, 30, 19069, 7103, 1251, 38, 28223, 9, 51, 1448, 45, 51, 2210, 28223, 1780...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jsTree - creating links targeting another frame for IE6 === With the following, I am able to get [jsTree](http://www.jstree.com) to target another frame in IE9, but not for IE6. IE6 does nothing when the link is clicked. **HTML**<br /> Notice that I've tried setting the target attribute for the a element for the target frame in Example 1 and the link still goes nowhere for IE6. In both examples, the link goes to the correct frame for IE9. <div id="MainMenu"> <ul> <li rel="folder"><a href="#">Example 1</a><ul> <li rel="folder"><a href="#">Group Level</a><ul> <li rel="file"><a target="right" href="link1">link 1</a></li> <li rel="file"><a target="right" href="link2">link 2</a></li> <li rel="file"><a target="right" href="link3">link 3</a></li> </ul> </li> </ul> </li> <li rel="folder"><a href="#">Example 2</a><ul> <li rel="folder"><a href="#">Group Level</a><ul> <li rel="file"><a href="link1">link 1</a></li> <li rel="file"><a href="link2">link 2</a></li> <li rel="file"><a href="link3">link 3</a></li> </ul> </li> </ul> </li> </ul> </div> **jsTree script**<br /> In the following script, `.bind("select_node.jstree"` is the function that sets the links which works correctly in IE9, but not IE6. $(function() { $("#MainMenu") .bind("select_node.jstree", function(e, data) { var href = data.rslt.obj.children("a").attr("href"); // send to a frame: parent.document.frames["right"].location.href = href; // or just follow the link: document.location.href = href; // or load it somewhere else: $("#the_div").load(href); }) .jstree({ "core": { "animation": 500 }, // 500 is default "themes": { "theme": "classic" }, "types": { "types": { "folder": { "select_node": function(e) { this.toggle_node(e); return false; }, "icon": { "image": "/jsTree/folder.png" } }, "file": { "valid_children": ["none"], "icon": { "image": "/jsTree/file.png" } } } }, "plugins": ["themes", "html_data", "types", "ui"] }); }); What needs to be updated to get IE6 to target another frame? It's OK if there needs to be a completely separate script for IE6.
0
[ 2, 487, 18, 8101, 13, 8, 2936, 6271, 15972, 226, 3523, 26, 13, 660, 379, 800, 3726, 3726, 29, 14, 249, 15, 31, 589, 777, 20, 164, 636, 728, 18, 8101, 500, 5, 21127, 6903, 6483, 9, 728, 18, 8101, 9, 960, 6, 20, 2935, 226, 352...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Prevent iFrame from taking parent CSS === How is it possible to prevent a iFrame object from taking on css properties from the main page. (or I think that is what it is doing) Specifically: I'm creating an iframe object in my main class and I'm trying to change the opacity of the main page when the iFrame is displayed but for some reason it changes the opacity of the iFrame too. I tried to put the code but it looks to ugly... Basicly im trying to do something like the Facebook (or may other websites) way of looking at images. The background turns dark(ish) and a page pop ups and you can navigate through that.
0
[ 2, 2501, 31, 8361, 37, 741, 4766, 272, 18, 18, 800, 3726, 3726, 184, 25, 32, 938, 20, 2501, 21, 31, 8361, 3095, 37, 741, 27, 272, 18, 18, 3704, 37, 14, 407, 2478, 9, 13, 5, 248, 31, 277, 30, 25, 98, 32, 25, 845, 6, 3524, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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++: Number Arranging Program Not Working Properly === I have tried making a program to sort numbers of an array. I have done my best but there is this problem: Although I do a loop to swap the numbers and arrange them, when I output the array, nothing changes and the array remains the same. The code will make everything clearer This is the main function: int main(){ int arr[10]; //For loop to get from user numbers to be put into the array for ( int i = 0; i<10; i++){ cout << "Enter the number to be recorded: "; cin >> arr[i]; cout << endl; } // Set counter n to 0 ( counts numbes of number swaps) int n = 0; do { //re sets counter to 0 n=0; //Check the entire loop if arr[i] bigger than arr[i+1] and swaps their values if true then adds 1 to n for ( int i = 0; i>9; i++){ if(arr[i]>arr[i+1]){ swap(&arr[i], &arr[i+1]);//swaps by sending the addresses of the two array elements the pointers in the swap function n++; } } }while(n>0); // if counter = 0 then end (therefore the numbers are arranged correctly since no swapping happened) cout << "The numbers ordered are:\n\n"; // Loop to output the arranged array for (int i =0; i<10; i++){ cout << arr[i] << ", "; } cout<<endl; system("PAUSE"); return 0;} This is the swap function: void swap ( int *p, int *t){ int temp; temp = *p; *p = *t; *t = temp;} I hope you guys can help me with my problem here and tell me what's wrong with this code Thank you all
0
[ 2, 272, 20512, 45, 234, 22026, 625, 52, 638, 7428, 800, 3726, 3726, 31, 57, 794, 544, 21, 625, 20, 2058, 2116, 16, 40, 7718, 9, 31, 57, 677, 51, 246, 47, 80, 25, 48, 1448, 45, 419, 31, 107, 21, 5293, 20, 17150, 14, 2116, 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...
unable to run eclipse on my mac. === Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: /Users/mdLeland/Documents/workspace/Tellurium/\Users\mdLeland\Documents\workspace\chromedriver.exe at com.google.common.base.Preconditions.checkState(Preconditions.java:176) at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:130) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:125) at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:61) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107) at Tellurium.Tellurium.App.main(App.java:36)
1
[ 2, 2343, 20, 485, 11652, 27, 51, 1572, 9, 800, 3726, 3726, 5391, 19, 9322, 13, 7, 6232, 7, 8247, 9, 9949, 9, 5564, 4941, 3859, 10066, 872, 45, 14, 2425, 1396, 17194, 5924, 630, 52, 3182, 45, 13, 118, 16704, 18, 118, 79, 8271, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
git svn dcommit fail === when I do git svn dcommit, it report error like below: git svn dcommit Committing to http://192.168.33.203/svn/repos/mt6577/platform/branches/vendor-ALPS.ICS2.6577.SP.V1_HUAQIN77_CU_ICS ... summit merge conflict: file or directory “mediatek/platform/mt6577/external/meta/sgx” is out of date;please update: resource out of date; try updating at /usr/local/libexec/git-core/git-svn line 579 My operations: 1. do three commits(commit34,commit35,commit36) in local 2. git svn dcommit these three commits to svn 3. amend commit34,commit35 by rebase command 4. git svn dcommit , then report above error. How to handle the error, thanks much.
0
[ 2, 13, 10404, 13, 18, 16578, 13, 43, 960, 5130, 7476, 800, 3726, 3726, 76, 31, 107, 13, 10404, 13, 18, 16578, 13, 43, 960, 5130, 15, 32, 1330, 7019, 101, 1021, 45, 13, 10404, 13, 18, 16578, 13, 43, 960, 5130, 19524, 20, 7775, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does Intel VT host need IDT? === From the intel manual,we known that extern interrupt will cause VMM GUEST VMM-Exit , and VMM HOST can inject interrupt through VMM-Entry,so the VMM GUEST can handle But I wonder some detail about VMM HOST handling interrupts. 1. Does VT HOST need a IDT table? CPU could handle interrupts through the IDT vectors,find a specifid procedure in the IDT table to handle the interrupt. 2. how does the cpu process the interrupt while it's in the root-state state.
0
[ 2, 630, 14635, 566, 38, 2015, 376, 4924, 38, 60, 800, 3726, 3726, 37, 14, 14635, 5132, 15, 458, 167, 30, 1396, 8766, 15811, 129, 1679, 566, 3363, 2427, 566, 3363, 8, 1706, 242, 13, 15, 17, 566, 3363, 2015, 92, 20316, 15811, 120, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Voice Detection in C# === I'm looking for a simple C# real-time voice detection library. The input should be an audio stream, and the output should be "human voice" or "not a human voice". I have no knowledge in speech recognition or signal processing, and I'll appreciate any kind of assistance.
0
[ 2, 430, 11643, 19, 272, 5910, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 1935, 272, 5910, 683, 8, 891, 430, 11643, 1248, 9, 14, 6367, 378, 44, 40, 4023, 3766, 15, 17, 14, 5196, 378, 44, 13, 7, 7057, 430, 7, 54, 13, 7, 1270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python Multithreading, run two functions at the same time === So I'm learning about socket programming and have wrote a nifty little chat server. The problem I am having is that my client cannot read and write at the same time. I'm not too sure how to set this up. This is what I have so far, I want read() and write() to be running concurrently: > import socket import threading > > class Client(threading.Thread): > > def __init__(self): > self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > self.socket.connect(('127.0.0.1', 1234)) > print('Client connected to server') > > self.readThread = threading.Thread.__init__(self) > self.writeThread = threading.Thread.__init__(self) > > def read(self): > data = self.socket.recv(1024) > if data: > print('Received:', data) > > def write(self): > message = input() > self.socket.send(bytes(message, 'utf-8')) > > > client = Client() > > while True: > #do both
0
[ 2, 20059, 1889, 96, 22883, 15, 485, 81, 3719, 35, 14, 205, 85, 800, 3726, 3726, 86, 31, 22, 79, 2477, 88, 18482, 3143, 17, 57, 738, 21, 1781, 3072, 93, 265, 6615, 8128, 9, 14, 1448, 31, 589, 452, 25, 30, 51, 6819, 1967, 1302, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asana API returning incorrect data === The data I get from Asana API somehow is returning incorrect data. For example, the order of the tasks return does not correspond to the current web UI..which is necessary for me to go through the items and take tasks under a certain heading. In addition, when I get tasks from a user, the assignee_status is incorrect as well. I have a completed task out of today but the assignee_status is still today. Is this the correct behavior? Thanks a lot.
0
[ 2, 28, 1629, 21, 2159, 2485, 18867, 1054, 800, 3726, 3726, 14, 1054, 31, 164, 37, 28, 1629, 21, 2159, 3625, 25, 2485, 18867, 1054, 9, 26, 823, 15, 14, 389, 16, 14, 8674, 788, 630, 52, 14217, 20, 14, 866, 2741, 13, 5661, 9, 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...
Minecraft server daily restart script === I've been searching to try to find the information I need, but I have so far been unsuccessful. What I would like to have happen is the following: Every time the machine starts, the Minecraft server is started. (I have the shell commands already written for this.) At 8:00 AM, the text "stop" is submitted to the server to cause it to gracefully stop. At 8:01 AM, the computer restarts. Ideally, this will open a window on my desktop that enter commands into, and also have a way to send commands to the server through a remote terminal. How do I do this? I have found information on using "sudo crontab -e" in order to allow super-user access needed to run the Minecraft server. I have also looked into using named pipes, but I can't quite get it working right. I can create it with "mkfifo mcserver", but it blocks unless I open the pipe in another terminal. I have also looked into screen, as well as sending commands to a directory based on the pid, but I have not been able to get that to work either. How would I detect and store the pid? Thank you for your help. It's greatly appreciated. I've been struggling with this for quite a while, and I just can't seem to figure it out.
2
[ 2, 1114, 7856, 8128, 1954, 22767, 3884, 800, 3726, 3726, 31, 22, 195, 74, 5792, 20, 1131, 20, 477, 14, 676, 31, 376, 15, 47, 31, 57, 86, 463, 74, 7225, 9, 98, 31, 83, 101, 20, 57, 2384, 25, 14, 249, 45, 352, 85, 14, 1940, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows Azure - is this possible? === I'm new to Azure (I've only worked with AWS), so please pardon me if this is naive. I'm currently building an infrastructure which does the following: 1. There is a pool of servers, where the number of servers is elastic based on some logic (say on load, where load is not just number of clients). I want to add/remove instances programatically using a master. 2. The pool of servers host a web service, and I want outside clients to connect based on some criteria. I was thinking the master above could do the partitioning and client assignment. Is this possible in Azure? Can I change the default load balancing to return a custom DNS address to the client?
2
[ 2, 1936, 25715, 13, 8, 25, 48, 938, 60, 800, 3726, 3726, 31, 22, 79, 78, 20, 25715, 13, 5, 49, 22, 195, 104, 577, 29, 21, 10268, 6, 15, 86, 2247, 13526, 55, 100, 48, 25, 16288, 9, 31, 22, 79, 871, 353, 40, 5282, 56, 630, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the correct way to "serialize" functions in javascript for later use === I have a "library" of objects that I want to load on the fly from a database. Each object comes with its own special functions that are called at specific times depending on the objects type. Ideally I'd like to be able to do this, although its been pointed out that this doesn't work: library = { "myObj" : {"name" : "myObj", "type" : "myType", "function" : function () { } } //, etc } The string `"myObj"` is passed around my program quite a bit, but I only have to access certain values of the object at a time, and in some circumstances there's a specific function that needs to be run. The problem is that I'm looking at hundreds, and eventually thousands, of potential objects that could exist with varying functions. What is the "right" way to store a function to be called like this. I know that calling eval can be very unsafe during execution, enabling xss attacks and whatnot. I really want to avoid a massive switch statement or the bloated loading of additional functions. I'd also like the solution to be as concise as possible. This can't be the first time this has come up. ;/ Thanks for your help.
0
[ 2, 98, 25, 14, 4456, 161, 20, 13, 7, 4104, 2815, 2952, 7, 3719, 19, 8247, 8741, 26, 138, 275, 800, 3726, 3726, 31, 57, 21, 13, 7, 1210, 2559, 622, 7, 16, 3916, 30, 31, 259, 20, 6305, 27, 14, 2855, 37, 21, 6018, 9, 206, 309...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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.corner() transparent background in IE === I'm tryying to use Jquery.corner() to rounded my divs corners but in IE que corner backgrond is the parent div color (body color: #C70036;) but i'm using a backgroung-image so as you can see in the yellow boxes ([here][1]) is not working properly... After search for a while I've found this: $("myDiv").corner("cc:#fff round 20px"); But the background is not just 1 colour so I can't use "cc:#000000". Do you know any way make the corner background be transparent? Thanks for the answers! [1]: http://i.stack.imgur.com/Dudmv.png
0
[ 2, 487, 8190, 93, 9, 8559, 106, 5, 6, 14862, 2395, 19, 13, 660, 800, 3726, 3726, 31, 22, 79, 1131, 8173, 20, 275, 487, 8190, 93, 9, 8559, 106, 5, 6, 20, 8472, 51, 13, 12916, 18, 8894, 47, 19, 13, 660, 9386, 1531, 97, 7944, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 set text to be copied to clipboard when image is copied? === I am building a web page and have run into something that would be nice to be able to do; set text to be copied to the clipboard when someone tries to copy an image, probably the same as the alt text. Is there any way with javascript/html that this can be done? If so, please explain. Thanks for any help!
0
[ 2, 184, 92, 31, 309, 1854, 20, 44, 18225, 20, 12229, 2806, 76, 1961, 25, 18225, 60, 800, 3726, 3726, 31, 589, 353, 21, 2741, 2478, 17, 57, 485, 77, 301, 30, 83, 44, 2210, 20, 44, 777, 20, 107, 73, 309, 1854, 20, 44, 18225, 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...
GTK# - Not able to run on Windows? (System.IO.FileNotFoundException) === Compiling/developing on MonoDevelop 2.68 w/ Ubuntu 12.04 to make a multi-platform program for a game, and it will not run on any Windows computer. <Br > Error messages: <br> Problem Event Name: APPCRASH Application Name: EasyMinecraft.exe Application Version: 1.0.4592.4854 Application Timestamp: 5013435c Fault Module Name: KERNELBASE.dll Fault Module Version: 6.1.7600.16850 Fault Module Timestamp: 4e211485 Exception Code: e0434352 Exception Offset: 0000b9bc OS Version: 6.1.7600.2.0.0.768.3 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 That wasn't my error report, but someone using Win7 and trying to use my program.<br> On my Windows XP computer, all I get is a system.io.filenotfoundexception; no lines to know where to check or anything, just that.<br><br> Source code: using System; using System.IO; using Gtk; public partial class MainWindow: Gtk.Window { //Linux/mac is listed as lin, Windows is listed as win string OperatingSystem; bool configExists; //Our locations string jarLoc; string confLoc; //RAM? RAM. string MinimumRam = ""; string MaximumRam = ""; public MainWindow (): base (Gtk.WindowType.Toplevel) { Build (); //Check for directories, for everything we need! if (!Directory.Exists(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/conf")) { try { Directory.CreateDirectory(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/conf"); Console.WriteLine ("Configuration folder created!"); confLoc = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/conf"; } catch (Exception ex) { Console.WriteLine ("Could not create Configuration folder:"); Console.WriteLine (ex.ToString ()); } } if (!Directory.Exists(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/jar")) { try { Directory.CreateDirectory(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/jar"); Console.WriteLine ("Jar folder created!"); jarLoc = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/EasyMinecraft/jar"; } catch (Exception ex) { Console.WriteLine ("Could not create Jar folder:"); Console.WriteLine (ex.ToString ()); } } if (!Directory.Exists (confLoc + "/config.bat") || !Directory.Exists (confLoc + "/config.sh")) { configExists = false; Console.WriteLine ("No configuration exists!"); } else { configExists = true; Console.WriteLine ("Configuration exists!"); } } void CreateConfig() { if (!configExists) //Check if the config exists { if (OperatingSystem == "win") //Windows: Create config.bat with UTF8 encryption { try { FileStream fs = File.Create (confLoc + "config.bat"); StreamWriter sw = new StreamWriter(fs); sw.WriteLine ("java -jar '" + jarLoc + "/minecraft.jar' -Xmx" + MaximumRam + "M -Xms" + MinimumRam + "M"); sw.Close (); sw = null; fs.Close (); fs = null; } catch (Exception ex) { Console.WriteLine (ex.ToString ()); } configExists = true; } else if (OperatingSystem == "lin") //It's the exact same code, but hey, We don't want both batch and shell for linux/windows! { try { FileStream fs = File.Create(confLoc + "/config.sh"); StreamWriter sw = new StreamWriter(fs); sw.WriteLine ("java -jar '" + jarLoc + "/minecraft.jar' -Xmx" + MaximumRam + "M -Xms" + MinimumRam + "M"); sw.Close (); sw = null; fs.Close (); fs = null; } catch (Exception ex) { Console.WriteLine (ex.ToString()); } configExists = true; } else //Undefined..? Do nothing :o { Console.WriteLine ("Undefined Operating System!"); } } else //We don't want to do anything if there is config.. { Console.WriteLine ("There is already config; delete it if you wish to rebuild it."); } } protected void OnDeleteEvent (object sender, DeleteEventArgs a) { Application.Quit (); a.RetVal = true; } //Run Minecraft protected void OnRunBtnPressed (object sender, System.EventArgs e) { if (windows.Active) { OperatingSystem = "win"; } else if (maclinux.Active) { OperatingSystem = "lin"; } if (!configExists) { CreateConfig(); Console.WriteLine ("Had to create config!"); } if (OperatingSystem == "win") //Windows! { System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "cmd.exe"; //proc.StartInfo.RedirectStandardError = true; //proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.UseShellExecute = false; proc.Start(); cmdentry.Text = "cd " + confLoc + "config.bat"; //Le test /* string errorMessage = proc.StandardError.ReadToEnd(); proc.WaitForExit(); Console.WriteLine (errorMessage); string outputMessage = proc.StandardOutput.ReadToEnd(); proc.WaitForExit(); Console.WriteLine (outputMessage);*/ } else if (OperatingSystem == "lin") { System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "gnome-terminal"; proc.Start (); cmdentry.Text = "bash " + confLoc + "/config.sh"; } } //Build a configuration file which will be used when running minecraft. protected void OnMakeConfigPressed (object sender, System.EventArgs e) { if (windows.Active) { OperatingSystem = "win"; } else if (maclinux.Active) { OperatingSystem = "lin"; } else { OperatingSystem = ""; } MinimumRam = miniRAM.Text; MaximumRam = MaxRAM.Text; CreateConfig(); } } Sorry I can't be precise, that's just about all I know at the moment!<br> Any help is appreciated; thanks!
0
[ 2, 9509, 197, 5910, 13, 8, 52, 777, 20, 485, 27, 1936, 60, 13, 5, 10724, 9, 1963, 9, 16877, 1270, 12235, 10066, 872, 6, 800, 3726, 3726, 24378, 118, 26051, 68, 27, 4129, 26051, 172, 9, 4279, 619, 118, 287, 12968, 2473, 390, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TransportException 404 Error Not Found in Refreshbooks (Freshbboks Helper Library) === I am trying to make the following Freshbook API call using python helper library RefreshBooks but i get the TransportException 404 Error Not Found when i try to get the reponse variable mentioned below. from refreshbooks import api c = api.TokenClient( 'abcd.freshbooks.com/api/2.1/xml-in', # Sample URL '12345wxyz', # Sample Token user_agent='Test-1/0' # Test User Agent ) response = c.client.list() # API Call of Freshbooks which give me the above mentioned exception Kindly help.
0
[ 2, 1739, 10066, 872, 13, 23397, 7019, 52, 216, 19, 24905, 13828, 13, 5, 22373, 220, 12418, 18, 448, 106, 1248, 6, 800, 3726, 3726, 31, 589, 749, 20, 233, 14, 249, 3180, 5199, 21, 2159, 645, 568, 20059, 448, 106, 1248, 24905, 13828...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 all childs of root node in jtree? === I want to get all child nodes of root node. ex: Root child1 child1.child1 child2 child2.child1 Now I want to get the two child nodes called "child1" and "child2". How to do that? Is there any possibilities? Please help me, Thanks in advance..
0
[ 2, 184, 20, 164, 65, 850, 18, 16, 5900, 15421, 19, 487, 8101, 60, 800, 3726, 3726, 31, 259, 20, 164, 65, 850, 16272, 16, 5900, 15421, 9, 1396, 45, 5900, 850, 165, 850, 165, 9, 11287, 165, 850, 135, 850, 135, 9, 11287, 165, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Keep ListBox view when adding objects to the top of the list === This problem has been asked before, but I haven't found any satisfying solution so I'm asking again. I have a ListBox with a lot of items which updates automatically. When new items are added to the top of the list, the scroll keeps its position, but the items are pushed down and go away from the view. I want a transparent way for doing this. I tried to keep track of the CurrentItem in the view before adding items, and then restoring it after all elements are added, but there is a "jump" which is annoying. I could defer the refresh of the items until the user scrolls to the top. For me, this seems as the best solution. It still "jumps", but there is less noticeable. Does the .NET API provide anything better than this hacks? I've been searching and didn't find anything. Thanks
0
[ 2, 643, 968, 5309, 1418, 76, 4721, 3916, 20, 14, 371, 16, 14, 968, 800, 3726, 3726, 48, 1448, 63, 74, 411, 115, 15, 47, 31, 2933, 22, 38, 216, 186, 19617, 4295, 86, 31, 22, 79, 3379, 188, 9, 31, 57, 21, 968, 5309, 29, 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...
New Value before RowEditEnding === i use `RowEditEnding` event, but this code DataRowView rowView = dataGrid1.SelectedValue as DataRowView; MessageBox.Show(Convert.ToString(rowView[7])); return me lost value, how i can get new value?
0
[ 2, 78, 1923, 115, 3131, 69, 242, 7601, 800, 3726, 3726, 31, 275, 13, 1, 5417, 69, 242, 7601, 1, 807, 15, 47, 48, 1797, 1054, 5417, 4725, 3131, 4725, 800, 1054, 16375, 165, 9, 18, 7138, 15165, 28, 1054, 5417, 4725, 73, 2802, 5309...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Build a social networking site in Drupal 7? === I'm using Drupal 7 for several months. It is great CMS but there is to many modules that do something but not the full thing. I DECIDE TO ASK DRUPAL COMMUNITY TO HELP ME FIND GOOD DRUPAL MODULES that will allow me to build Social Network site like facebook, tweeter. Where people would can have friends, followers profiles etc. I search on net and find several modules that alow that functionality but don't know if they are good: - http://drupal.org/project/heartbeat - http://drupal.org/project/statuses - https://drupal.org/project/fbsmp - http://drupal.org/project/message - http://drupal.org/project/activity/ - http://drupal.org/project/user_relationships FINALY THE QUESTION: Is there any good up to date moudule/modules that will allow me to build a social network site? If anyone has some experience with this please help.
1
[ 2, 1895, 21, 668, 16230, 689, 19, 15708, 6720, 453, 60, 800, 3726, 3726, 31, 22, 79, 568, 15708, 6720, 453, 26, 238, 818, 9, 32, 25, 374, 2390, 18, 47, 80, 25, 20, 151, 17113, 30, 107, 301, 47, 52, 14, 503, 584, 9, 31, 4073,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mysql Join Query for Result from two table === I have Two Table One to store Questions and Other to store Replies to Questions as Below I have Shown the Table Structure and Column in table as Below **Question Table** <pre> Question_Id(PK) | Question | Name | EmailAddress </pre> **Answer Table** <pre> Answer_Id | Question_Id | Question | Name | EmailAddress </pre> What ever question is posted it will be added to Question table and What ever Replies people post will be added to answer table Now when ever Some one post a Reply to Question I Should Send mail to one who Posted Question and to those who posted Replies to the Question Please Suggest a mysql Query for the above Thank you
0
[ 2, 51, 18, 22402, 1865, 25597, 26, 829, 37, 81, 859, 800, 3726, 3726, 31, 57, 81, 859, 53, 20, 1718, 2346, 17, 89, 20, 1718, 16287, 20, 2346, 28, 1021, 31, 57, 1721, 14, 859, 1411, 17, 4698, 19, 859, 28, 1021, 13, 1409, 24652,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unexpected Date Conversion failure with Spring Roo and Spring MVC === I use Spring MVC together with Spring Roo and I have added a JPA finder to one of my entities. I also have @RooWebScaffold and a @RooWebFinder annotations as follows: @RooWebScaffold(path = "plis", formBackingObject = Pli.class) @RooWebFinder One of my JPA finders uses a java.util.Date and when I run the @RooWebFinder, I systematically get the following exception in the console and I am redirected to a 404: 2012-07-13 14:13:31,515 ["http-bio-8131"-exec-16] DEBUG org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolving exception from handler [public java.lang.String trc.suivi.controller.PliController.findPlisByIdentifiantLikeAndDateReceptionBetweenAndPaiementAndARAndNumeroARLikeAndFDVAndConteneurNumAndStatut(java.lang.String,java.util.Date,java.util.Date,java.lang.Boolean,java.lang.Boolean,java.lang.String,java.lang.Boolean,trc.suivi.domain.ConteneurNum,trc.suivi.domain.StatutPli,org.springframework.ui.Model)]: org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type @org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.util.Date for value '2012-07-04'; nested exception is java.lang.IllegalArgumentException: Invalid format: "2012-07-04" is malformed at "12-07-04" What am I missing out?
0
[ 2, 9380, 1231, 6263, 2990, 29, 1573, 12764, 17, 1573, 307, 8990, 800, 3726, 3726, 31, 275, 1573, 307, 8990, 429, 29, 1573, 12764, 17, 31, 57, 905, 21, 487, 1060, 13, 18639, 20, 53, 16, 51, 12549, 9, 31, 67, 57, 13, 1, 661, 111...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tidy way to delete image from Gtk::TreeStore === I have an dialog window with Gtk::TreeView. This dialod shows main filesystem tree and provides option to select folders on the disk. When user selects some folder, I am adding an Gtk::Stock image to the row that represents that folder. To do this, I have created an Gtk::CellRendererPixbuf associated with the last column of my tree: //appending columns directory_tree.append_column("Folder List", dir_columns.name); Gtk::TreeViewColumn *column = directory_tree.get_column(0); if(column) column->set_expand(true); Gtk::CellRendererPixbuf *cell = Gtk::manage(new Gtk::CellRendererPixbuf); directory_tree.append_column("", *cell); column = directory_tree.get_column(1); if(column) column->add_attribute(cell->property_stock_id(), dir_columns.stock_id); Link to this bit of code: https://github.com/mc-suchecki/Imagine/blob/master/gui/dialogs.cpp#L47 Gtk::CellRendererPixbuf 'translates' Gtk::StockId found in 'dir_columns.stock_id' to an image located in tree. When I add image to row like this: //selecting folder (*folder)[fs_columns.stock_id] = Gtk::StockID(Gtk::Stock::FIND).get_string(); (*folder)[fs_columns.included] = true; everything is ok, but when I try to delete the image this way: //unselecting folder (*folder)[fs_columns.stock_id] = ""; (*folder)[fs_columns.included] = false; the image correctly disappears, but there are some errors in command line like this (this is not the exact message, I will post it when I will be able to launch my application): (imagine:9376): Gtk-WARNING **: Gtk StockId not found Of course the reason of the warning is obvious (there is no StockId item associated with blank name), however my question is: Is there a way to delete an image from Gtk::TreeView row which would not generate any Gtk warnings? Code where i deselect folder is here: https://github.com/mc-suchecki/Imagine/blob/master/core/core.cpp#L207 Thank you very much in advance and sorry for my English.
0
[ 2, 28028, 161, 20, 27448, 1961, 37, 9509, 197, 45, 45, 8101, 16828, 800, 3726, 3726, 31, 57, 40, 28223, 1463, 29, 9509, 197, 45, 45, 8101, 4725, 9, 48, 11601, 5648, 1285, 407, 3893, 10724, 1541, 17, 1927, 4255, 20, 5407, 19294, 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...
Get a working mod_rewrite and .htaccess on custom php site === I just need that this URL www.mysite.com/index.php?url=othersite.com gets rewritten to www.mysite.com/othersite.com I have written this .htaccess RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?url=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?url=$1 Also added that code to a .htaccess file and uploaded to site root togethger with index.php file, but no matter what, I allways get www.mysite.com/index.php?url=othersite.com Thanks a lot in advise!
0
[ 2, 164, 21, 638, 7226, 1, 99, 23716, 17, 13, 9, 9020, 20604, 27, 5816, 13, 26120, 689, 800, 3726, 3726, 31, 114, 376, 30, 48, 287, 6362, 13, 6483, 9, 915, 9097, 9, 960, 118, 25671, 9, 26120, 60, 911, 255, 3726, 9539, 9097, 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...
RTMFP connections === Excuse me, I would like to clarify this with you. The ingredients to make a RTMFP connection possible are... you require a Cirrus developer key, a Flash Media Server or FMS hosting, a web server and Flash player 10 or higher. Finally will you need to edit your API's in Actionscript or Actionscript 3. Is this correct or am i missing something?
0
[ 2, 13, 5256, 79, 12087, 6760, 800, 3726, 3726, 6658, 55, 15, 31, 83, 101, 20, 23116, 48, 29, 42, 9, 14, 14129, 20, 233, 21, 13, 5256, 79, 12087, 2760, 938, 50, 9, 9, 9, 42, 4077, 21, 14531, 3403, 10058, 1246, 15, 21, 4433, 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...
Regex to get specific querystring variable in a url === I have a url form like server/area/controller/action/4/?param=2" in which server can be http://localhost/abc https://test.abc.com https://abc.om i want to get first parameter which is 4 in url with regex? does it possible with regex in js, or is there any way?
0
[ 2, 7953, 1706, 20, 164, 1903, 25597, 11130, 7612, 19, 21, 287, 6362, 800, 3726, 3726, 31, 57, 21, 287, 6362, 505, 101, 8128, 118, 17760, 118, 12898, 1252, 118, 8645, 118, 12918, 60, 6351, 79, 3726, 135, 7, 19, 56, 8128, 92, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Serializing/Deserializing Singleton class or class with no default or no parameter constructor in java? === Can we Serializing/Deserializing Singleton class or class with no default or no parameter constructor in java? if not what is the way to do it?? will creating a no parameter protected constructor help?
0
[ 2, 5956, 3335, 118, 3196, 106, 2815, 3335, 345, 444, 718, 54, 718, 29, 90, 12838, 54, 90, 18906, 6960, 248, 19, 8247, 60, 800, 3726, 3726, 92, 95, 5956, 3335, 118, 3196, 106, 2815, 3335, 345, 444, 718, 54, 718, 29, 90, 12838, 54...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MongoDB return all documents by field without duplicates? === Is there any way in the mongo shell I can return all documents in a collection, but order them by a specific field and remove any documents with fields the same as other documents? Thanks.
0
[ 2, 3521, 5474, 220, 788, 65, 4374, 34, 575, 366, 19429, 18, 60, 800, 3726, 3726, 25, 80, 186, 161, 19, 14, 3521, 839, 3593, 31, 92, 788, 65, 4374, 19, 21, 1206, 15, 47, 389, 105, 34, 21, 1903, 575, 17, 4681, 186, 4374, 29, 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, 0, 0, 0, 0, 0, 0, 0, 0...
How to pass a dynamic object from View to Controller === I need a Partial View with a some dynamic input fields. To do this, my model contains an object of type "object", and then in my controller I create a new model with the related object type "myobject". All works fine in the PartialViewResult, but after the form submit the object does not contain my object type "myobject". How to send in the form submit the correct object? Controller: public PartialViewResult mypage() { myModel model = new myModel(); myObject obj = new myObject(); model.myobject = obj; return PartialView(“mypage”,model); } public PartialViewResult Save (myModel model) { // Here I need model.myobject!!! } Model: public class myModel { public long id {get;set;} public object myobject {get;set;} } public myObject { public string myname {get;set;} } View: @model myModel // form (code omitted) @Html.EditorFor(model => model.myobject) <button type="submit">Save</button> Template @model myObject @Html.EditorFor(model => model.myname)
0
[ 2, 184, 20, 1477, 21, 7782, 3095, 37, 1418, 20, 9919, 800, 3726, 3726, 31, 376, 21, 7284, 1418, 29, 21, 109, 7782, 6367, 2861, 9, 20, 107, 48, 15, 51, 1061, 1588, 40, 3095, 16, 1001, 13, 7, 23793, 7, 15, 17, 94, 19, 51, 9919...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ripple emulator freezes on startup === I've been using Ripple (v0.9xx) for developing Blackberry apps using the Webworks SDK (v 2.3.x.x) but just a little while ago, Ripple has stopped working and only freezes when I try to load it up. If I uninstall and reinstall, it starts successfully but then crashes when I try to load an app into the emulator. After that, it will only freeze again whenever I start it. This continues until I decide to uninstall and reinstall after which the cycle starts again. How do I fix this?
0
[ 2, 15761, 3579, 14868, 11551, 18, 27, 20205, 800, 3726, 3726, 31, 22, 195, 74, 568, 15761, 13, 5, 710, 387, 9, 518, 8962, 6, 26, 3561, 27367, 4865, 18, 568, 14, 2741, 7684, 13, 18, 43, 197, 13, 5, 710, 172, 9, 240, 9, 396, 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...
Meteor custom mongodb during development === How would I use a (live running) mongodb (of another running meteor instance) to develop another meteor app? I tried modifying (`.meteor/server/server.js`) and specifying `MONGO_URL` to no avail before running `meteor`
0
[ 2, 17522, 5816, 3521, 5474, 220, 112, 522, 800, 3726, 3726, 184, 83, 31, 275, 21, 13, 5, 5928, 946, 6, 3521, 5474, 220, 13, 5, 1041, 226, 946, 17522, 4851, 6, 20, 2803, 226, 17522, 4865, 60, 31, 794, 17579, 68, 13, 5, 1, 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...
Android: Multiple view children for custom view with existing layout === I have to build a more complex custom view in Android. The final layout should look like this: <RelativeLayout> <SomeView /> <SomeOtherView /> <!-- maybe more layout stuff here later --> <LinearLayout> <!-- the children --> </LinearLayout> </RelativeLayout> However, in the XML files I just want do define this (without defining SomeView, SomeOtherView etc.): <MyCustomView> <!-- the children --> </MyCustomView> Is this possible in Android, and if yes: What would be the cleanest way to do it? The possible solutions that came to my mind were 'override the addView() methods' and 'remove all views and add them again later', but I am unsure which way to go... Thanks a lot in advance for your help! :)
0
[ 2, 13005, 45, 1886, 1418, 391, 26, 5816, 1418, 29, 3149, 9106, 800, 3726, 3726, 31, 57, 20, 1895, 21, 91, 1502, 5816, 1418, 19, 13005, 9, 14, 426, 9106, 378, 361, 101, 48, 45, 13, 1, 7256, 3366, 4414, 1320, 1, 13, 1, 3220, 472...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ModelForm and field generation === When using ModelForm Within forms.py it would save a lot of time, since there is no need to rewrite the whole fields again in forms. class ContactsForm(ModelForm): class Meta: model = Contact Taking a forms.Form instead would require to define all fields again manually. Some would prefer this approach due more control. While a lot of it is straight forward: models.CharField("First Name",max_length=30, blank=True) becomes forms.CharField(label = _(u'First Name'), max_length=30, blank=True) and `models.TextField(blank=True)` becomes `forms.TextArea(blank=True)` etc... One field is a bit of a mystery to me how it would be translated in forms, such as: models.ForeignKey(ContactType) How is a dropdownmenu to be defined within forms?
0
[ 2, 1061, 4190, 17, 575, 2782, 800, 3726, 3726, 76, 568, 1061, 4190, 363, 1997, 9, 6448, 32, 83, 2079, 21, 865, 16, 85, 15, 179, 80, 25, 90, 376, 20, 27891, 14, 979, 2861, 188, 19, 1997, 9, 718, 11894, 4190, 5, 13998, 4190, 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...
Error in writing ascii characters into a file in java/android === I have the following code: private char[] headerToWrite; protected String workingFileName; private void writeHeaderToFile() { try { String completeFile = new String(headerToWrite); File myFile = new File(workingFileName); FileOutputStream fOut = new FileOutputStream(myFile); OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut); myOutWriter.append(completeFile); myOutWriter.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } In the above code, the variable **headerToWrite** contains an array, where the first few values are: [1, Q, H, S, , 4, ±, Q, .....]. This in hex is [31, 51, 48, 53, 01, 34, B1, 51...]. It is used to create a string **completeFile** which = 1QHS 4±Q... However, when the file is being written, the file contains 1QHS 4űQ..... which in hex is 31 51 48 53 01 34 c2 b1 51.... I couldn't understand why there was an additional c2 but I discovered that the bytes inside **myOutWriter** were as follows: 49, 81, 72, 83, 1, 52, -62, -79, 81.... The interesting point here is the -62, -79 which seems to be responsible for c2, b1. For it to work, -62, -79 should just be 177, which is the decimal for b1. Interestingly 177 + 79 is 256. So evidently, in the transfer from ascii characters in **completeFile** to bytes in **myOutWriter**, c2 is being added. I was wondering if anyone could explain why and how to fix it. Thanks
0
[ 2, 7019, 19, 1174, 28, 1892, 49, 1766, 77, 21, 3893, 19, 8247, 118, 290, 18524, 800, 3726, 3726, 31, 57, 14, 249, 1797, 45, 932, 4892, 2558, 500, 157, 106, 262, 23716, 73, 3803, 3724, 638, 16877, 7259, 73, 932, 11364, 2757, 1743, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Symfony-2 gives more than one validation error message === My validation.yml is given: task: - Email: message: The email "{{ value }}" is not a valid email. - MinLength: { limit: 50, message: You must be 50 or under to enter. } My issue is that if I give "wrong-email" in the task-field it gives two error messages: The email "wrong-email" is not a valid email. You must be 50 or under to enter. Actually, I want to show only one error-message at a time. That means it should check for the validation "MinLength" only if it is a valid email.
0
[ 2, 13, 7261, 10229, 93, 8, 135, 2352, 91, 119, 53, 27999, 7019, 2802, 800, 3726, 3726, 51, 27999, 9, 93, 8184, 25, 504, 45, 3005, 45, 13, 8, 8517, 45, 2802, 45, 14, 8517, 13, 7, 1, 1923, 13, 1, 7, 25, 52, 21, 7394, 8517, 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...
Resize Jpanel based on component iside it === I have a Jtable inside a Jpanel. Maximum number of rows in table is 10. Based on the Table rows i need to resize JPanel. I should not get any Scroll pane. So, to be simple Based on the Table i shouls resize Jpanel. Is this possible?
0
[ 2, 302, 10454, 487, 3206, 532, 432, 27, 5912, 31, 1416, 32, 800, 3726, 3726, 31, 57, 21, 487, 5924, 572, 21, 487, 3206, 532, 9, 2979, 234, 16, 11295, 19, 859, 25, 332, 9, 432, 27, 14, 859, 11295, 31, 376, 20, 302, 10454, 487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 excel mime-type - how to change default filename? === I followed the http://railscasts.com/episodes/362-exporting-csv-and-excel and set up an Excel Download in my Rails application. My controller code looks like this: def show @project = Project.find(params[:id]) @project.tasks.order(:name) respond_to do |format| format.html format.json { render json: @project } format.xls end end and in my view I create the link to download the excel file like this: .dl_xls= link_to "Download xls", url_for(:format => 'xls') Now the generated excel file is always named like the id of the `Project` record, e.g. `80.xls` Is there any way to change this behaviour and give it a custom name? Thank you..
0
[ 2, 2240, 18, 20700, 26193, 8, 4474, 13, 8, 184, 20, 753, 12838, 3893, 7259, 60, 800, 3726, 3726, 31, 709, 14, 7775, 6903, 7301, 18, 6146, 18, 9, 960, 118, 13397, 18, 16842, 3698, 8, 1706, 1993, 68, 8, 6824, 710, 8, 290, 8, 170...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LastFullWeek starting with monday in crystal reports === When using LastFullWeek i get the last Sunday - Saturday week, but for my reports i want the last Monday - Sunday week. Is there any simple way to get this behaviour, or do I have to write my own function for it (which isn't that hard, but unconvenient for such a common date span.)
0
[ 2, 236, 13727, 7219, 1422, 29, 5745, 19, 4282, 2813, 800, 3726, 3726, 76, 568, 236, 13727, 7219, 31, 164, 14, 236, 2608, 13, 8, 3487, 877, 15, 47, 26, 51, 2813, 31, 259, 14, 236, 5745, 13, 8, 2608, 877, 9, 25, 80, 186, 1935, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 block PING/ICMP/Traceroutes in FreeBSD 9.0-RELEASE === When I am sending ping/ICMP requests to my remote server, the server gives me a reply - I would like to disable it. Also when I do tracert I got the full trace - I would like to block this also. How can it be done? Thanks for the help P.S I want to block ICMP/PING/TRACEROUTES only from incoming, not outgoing from the remote server.
0
[ 2, 184, 20, 1921, 13, 3181, 118, 596, 2554, 118, 38, 7367, 20179, 18, 19, 551, 4562, 43, 561, 9, 387, 8, 15202, 800, 3726, 3726, 76, 31, 589, 4907, 13, 3181, 118, 596, 2554, 12279, 20, 51, 5388, 8128, 15, 14, 8128, 2352, 55, 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...
Dojo: Is It Possible To Break A DataGrid Into Two Sections? === I have a long table with a lot of fields, that doesn't fit the defined page width I have to work with. Nothing can be made smaller, so my only option is to somehow break the table into two pieces, with half the columns on top, and half below. Short of actually creating two grids, and then marrying the data back up into one element behind the scenes, is there a way to do this with one grid? Or something like a grid?
0
[ 2, 107, 1636, 45, 25, 32, 938, 20, 1442, 21, 1054, 16375, 77, 81, 4501, 60, 800, 3726, 3726, 31, 57, 21, 175, 859, 29, 21, 865, 16, 2861, 15, 30, 1437, 22, 38, 2742, 14, 2811, 2478, 9456, 31, 57, 20, 170, 29, 9, 626, 92, 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...
Elegant and efficient way for Django templates? === I find myself ending up with template snippets in the following style: <ul> {% for item in items %} <li><a class="{% if item.active %}active{% endif %}" title="{{ item.title }}" href="{{ item.get_absolute_url }}"><img src="{% thumbnail item.image 24x24 crop upscale %}" />{{ item.title|truncate_chars:30 }}</a></li> {% endfor %} </ul> A while ago ai had to use a PHP framework which had some nice helpers for HTML output. I know that this cannot be directly compared, as it is not a _real_ template-layer (rather plain PHP) - but for the idea: <ul> <?php foreach($items as $item) { ?> <li><?= HTML::anchor($item->url(), HTML::mage($item->image->url(24)), Text::limit($item->title, 30), array('title' => $item->title, 'class' => ($item->active) ? 'active' : '') ?></li> <?php } ?> </ul> I liked a lot the approach not having to deal with the opening/closing HTML tags and writing the attributes includeing the __=__ 's and __"__ 's. Like: <?= HTML::anchor($url, $title, array('class' => $class)) ?> renders as: <a href="http://url.my/" class="my-class">My Title</a> How do you handle this kind of templateing? Do you know some goot templatetag-libraries that address this situation? Is it at all possible in django-templates or does their logic follow different paths/concepts?
0
[ 2, 11614, 17, 8243, 161, 26, 3857, 14541, 22894, 18, 60, 800, 3726, 3726, 31, 477, 992, 3119, 71, 29, 22894, 13, 29061, 18, 19, 14, 249, 1034, 45, 13, 1, 1287, 1, 13, 1, 11881, 26, 9101, 19, 3755, 13, 11881, 1, 13, 1, 1210, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 insert data into excel sheet using C#? === i want to create new excel sheet and insert data into it, from string array. i used the following code to create, now i want to insert data. Excel.Application xlApp; Excel.Workbook xlWorkBook; Excel.Worksheet xlWorkSheet; object misValue = System.Reflection.Missing.Value; xlApp = new Excel.Application(); //xlApp = new Excel._Application.ApplicationClass(); xlWorkBook = xlApp.Workbooks.Add(misValue); xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1); xlWorkSheet.Cells[1, 1] = "http://csharp.net-informations.com"; xlWorkBook.SaveAs("csharp-Excel.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue); xlWorkBook.Close(true, misValue, misValue); xlApp.Quit(); releaseObject(xlWorkSheet); releaseObject(xlWorkBook); releaseObject(xlApp); } private void releaseObject(object obj) { try { System.Runtime.InteropServices.Marshal.ReleaseComObject(obj); obj = null; } catch (Exception ex) { obj = null; MessageBox.Show("Exception Occured while releasing object " + ex.ToString()); } finally { GC.Collect(); } }
0
[ 2, 184, 20, 14692, 1054, 77, 20700, 6125, 568, 272, 5910, 60, 800, 3726, 3726, 31, 259, 20, 1600, 78, 20700, 6125, 17, 14692, 1054, 77, 32, 15, 37, 3724, 7718, 9, 31, 147, 14, 249, 1797, 20, 1600, 15, 130, 31, 259, 20, 14692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
populating a combolist automatically with data from sql database === can any help please, i am trying to populate the data automatically to my combobox without having to push any button, but by the dropdown control..... private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.AllowDrop == false) { SqlConnection conn = new SqlConnection("Data Source=localhost; database=KnowledgeEssentials;Trusted_Connection=yes;connection timeout=30"); SqlDataAdapter adapter = new SqlDataAdapter("SELECT Problem FROM PROBLEMT", conn); DataTable dt = new DataTable(); DataSet ds = new DataSet(); SqlDataAdapter ad = new SqlDataAdapter(); ad.SelectCommand = new SqlCommand("SELECT Problem FROM PROBLEMT", conn); ad.Fill(ds, "Problem"); dataGridView1.DataSource = dt; //Biding the data with the control BindingSource bs = new BindingSource(); bs.DataSource = ds; bs.DataMember = "Problem"; DataGridView dvg = new DataGridView(); this.Controls.Add(dvg); dvg.DataSource = bs; for (int i = 0; i < dt.Rows.Count; i++) { comboBox1.Items.Add(dt.Rows[i]["Problem"]); } } else { }
0
[ 2, 1675, 10038, 21, 22621, 5739, 7499, 29, 1054, 37, 4444, 255, 6018, 800, 3726, 3726, 92, 186, 448, 2247, 15, 31, 589, 749, 20, 1675, 12383, 14, 1054, 7499, 20, 51, 22621, 5309, 366, 452, 20, 3250, 186, 5167, 15, 47, 34, 14, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
disable file upload control using javscaript === How can i disable or enable File upload control of .NET framework using Javascript?? Does any one have idea, please help. Thanks in advance.
0
[ 2, 1460, 579, 3893, 71, 8294, 569, 568, 3009, 710, 18, 1367, 4307, 38, 800, 3726, 3726, 184, 92, 31, 1460, 579, 54, 9240, 3893, 71, 8294, 569, 16, 13, 9, 2328, 6596, 568, 8247, 8741, 60, 60, 630, 186, 53, 57, 882, 15, 2247, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Java: Changing Windows' recording settings (Stereomix) === I'm currently trying to write a program in Java that allows you to play back sounds. The main reason I'm writing it, however, is, that I want to create a soundboard that allows you to play sounds on, e.g. Teamspeak, so that other users can hear them. The usual way I know is Windows' "stereo mix" recording setting. Is there a way to make my program change the Windows recording settings while the clip is playing and reset them after the clip has ended? If not, is there any other approach I can try? Thanks in advance!
0
[ 2, 8247, 45, 4226, 1936, 22, 1576, 12410, 13, 5, 1911, 3894, 15743, 6, 800, 3726, 3726, 31, 22, 79, 871, 749, 20, 2757, 21, 625, 19, 8247, 30, 2965, 42, 20, 418, 97, 2795, 9, 14, 407, 1215, 31, 22, 79, 1174, 32, 15, 207, 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...
pthread_cond_timedwait() root causes of EINVAL === I am seeing in very rare cases pthread_cond_timedwait() return EINVAL and cause a fatal crash on our system. I understand that this means one of the parameters passed in has to be invalid, but how does the mutex or cond variable become invalid? Is there any way to check these arguments before calling pthread_cond_timedwait() to prevent a crash?
0
[ 2, 351, 96, 10647, 1, 1126, 43, 1, 891, 43, 8195, 5, 6, 5900, 4047, 16, 10235, 3377, 800, 3726, 3726, 31, 589, 2078, 19, 253, 2890, 1871, 351, 96, 10647, 1, 1126, 43, 1, 891, 43, 8195, 5, 6, 788, 10235, 3377, 17, 1679, 21, 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...