i would like to pass values from python to a c++ program for an encryption from inside a python program and then return the value from there to the python program . how to do it?
it seems like i have begin rescue end statements everywhere in my code. this doesn't seem like the correct thing to do. i am learning process, can anyone suggest how can i catch any exceptions without having to place everything inside begin,rescue, end.
anyway to just tell ruby to shut up and just keep going even if exception is raised ?
Greetings,
The question relates to ASP.NET MVC
I am creating some divs dynamically using AJAX (some views render dynamically). Inside these views a have some JS code. When user click on link i would like to open dialog box with google map. However, because these views are rendered dynamically it does not work because js code is not injected (what can be seen in page source). How can I resolve this problem?
import os
dictionaryfile = "/root/john.txt"
pgpencryptedfile = "helloworld.txt.gpg"
array = open(dictionaryfile).readlines()
for x in array:
x = x.rstrip('\n')
newstring = "echo " + x + " | gpg --passphrase-fd 0 " + pgpencryptedfile
os.popen(newstring)
I need to create something inside the for loop that will read gpg's output. When gpg outputs this string gpg: WARNING: message was not integrity protected, I need the loop to close and print Success!
How can I do this, and what is the reasoning behind it?
Thanks Everyone!
How would you use Matlab to do the following? I've got fuzzy square images about the same size and then inside the fuzzy square there's smaller fuzzy squares, and I want to clean up the larger squares - not the smaller ones - so that they are no longer blurred. It looks like I'd have to make some type of morphological mask, but I'm not sure how in this case.
I have a panel with several JLabel, I would like to change all their Icon,
String path = System.getProperty("user.dir");
for (int x=0;x< 21;x++) {
javax.swing.JLabel lab = boardPanel.getComponent(x).;
lab.setIcon(new ImageIcon(path + "\\image\\blank.jpg"));
}
it gives me an error of incompatible type, all inside the boardPanel are JLabel,
im using netbeans 6.8.
If a lot of nested dictionarys, I am trying to find a certain key.
this key is called "fruit". But it's nested inside somewhere. How do I find the value of this key?
I am using exec() inside a a script that runs as a daemon and forks child processes using the pear class Net_Server.
I am getting a strange issue whereby the return code (the third param of of exec) comes back as -1. When I run the command on the command line, or with exec in a normal php script the return code is 0 as it should be. Anyone have any idea why this is happening, and how to fix it?
What is purpose of this keyword. Doesn't the methods in a class have access to other peer members in the same class ? WHat is the need to call a this to call peer methods inside a class ??
For example,I click button and then on the form appears GroupBox with some controls inside.One more click-one more GroupBox.This may lasts to infinity.Please,tell me how to do that???
In php how would I grab all javascript from a page given it's url? Is there a good regular expression to get the src of all javascript script tags or the script inside of them?
I have a jsp file in the root of .war file.
and then I have a folder named STUFF.
How do I get access to the file read.txt inside STUFF?
/Name_of_war/STUFF/read.txt is the correct path?
Every now and then I have a problem with SVN inside eclipse folder gets locked, I have to check out projects few times update and stuff like that . is there a SVN that I can use to commit files directly from console or windows folders?
I have a form that is dynamically loaded through AJAX and dumped with innerHTML inside an area of a website. The problem I seem to encounter is that the labels don't seem to point to the inputs they're tied to, when clicked.
I'm sure the markup is correct because if I open that form html code separately the labels work.
Is there a solution to re-initialize somehow this sort of event natively? I'm not looking into simulating the behavior with JS.
Thanks!
My Activity has multiple lists so I have defined MyClickListener as below:
My question is how I should instantiate this class:
MyClickListener mMyClickListener = new MyClickListener();
Or maybe it is better to instantiate inside the onCreate(Bundle) and just define above. Whats considered the better way? I don't want too much in onCreate() its already full of stuff. Any thoughts on the declaration and instatiation? Whats the best way?
private class MyClickListener implements OnClickListener
{
@Override
public void onClick(View view) {
}
}
Hi
im looking to find how to implement this scenario:
i have logic code that is inside function,
now i like to be able to execute this function in a separate thread.
now what i have is a raw implementation of this ..
i simple Init the Thread that in its Start/Run method i keep the function logic .
how can i make it more generic ? so i could send the function ( mybe function pointer )
to generic thread factory/pool ?
in c++
Why this isn't allowed:
int a = 0;
int a = 0;
but this is:
for (int i = 0; i < 2; ++i)
{
int a = 0;
}
As far as I know code inside for loop will be executed twice whitout actually going out of its scope, so it should also be an error to define a twice.
Looking forward to your answers
Thanks.
Sorry if this question is obvious for some of you.
I know we can link to the existing Goggle Maps app, but I would like to have an app that does not exit and provides the direction within. I intend using GTFS for public transit.
On the other hand, would it be possible to plot a line inside the iPhone app the results as returned by Google Transit? (say, I send it the arrival and departure addresses)
Thank you so much!
I some divs with forms inside of them and i do have inputs with same ids but in different divs and forms so do like this:
$("divEdit form #ParentId").val(12);
it works on chrome/mozilla but not on IE8
anybody knows why ?
I am having a debugging test, as part of an interview.. I thought if any one can help with the approach, when I am faced with a large code base and have to find bugs inside that within an hour or two.This is going to be Core java based app (I guess) on Eclipse 3.2+
How do I extract foo from the following URL and store it in a varialbe, using regex in php?
http://example.com/pages/foo/inside.php
I googled quite a bit for an answer but most regex examples were too complex for me to understand.
I have a game and i use function gotoAndStop in actionscript to play frame "moving" in my character game.And in this frame have movieclip. How can i detect when movieclip inside frame "moving" end ?
Hi,
I'm trying to launch another application from C# application, is there a way to display this application inside the mainform of my application?
Thanks,