I have a hex string(lenght 48 chars) i want to convert to raw bytes with the pack function in order to put in in win32 vector of bytes.
could someone help how i can do this with perl ?
I would like to put a binary file in varbinary(MAX) column using _RecordsetPtr in a vc++ application.I am sure that lot of people have done this before. But I am new to database programming. Help is urgently needed ...Thanks in advance.
I've been working on sending text to an input element in Chrome and I noticed that, unlike in IE or FF, calling .focus() does not put the cursor in the text area. So does anyone know of an alternative for placing the cursor on a Chrome input element?
I'm very interested in developing Ajax based applications. This is, loading almost all of the content of the application via XMLHttpRequest, instead of only some combos and widgets. But if I try to do this form scratch, soon I find some problems without an easy solution. I wonder if there is some framework (both client and server side) to deal with this issues. As far as I know, there isn't (but I've searched mainly in Java world). So I am seriously thinking of doing my own framework, at least for my projects.
Therefore, in this question I ask for several things. First, the possible problems of an ajax based development. Then, I'm looking for some framework or utility in order to deal with them. Finally, if there is no framework available, what features must it have.
Here are the issues I thought:
1 - JavaScript must be enabled. Security paranoia isn't the only problem: a lot of mobile devices couldn't use the application, too.
2 - Sometimes you need to update more than one DIV (e.g. main content, menu and breadcrumbs).
3 - Unknown response type: when you make an Ajax call, you set the callback function too, usually specifying if expected response is a javascript object or in which DIV put the result. But this fails when you get another type of response: for example when the session has expired and the user must log in again.
4 - Browser's refresh, back and forward buttons can be a real pain. User will expect different behaviors depending on the situation.
5 - When search engines indexes a site, only follow links. Thus, content load by Ajax won't "exist" for who doesn't know about it yet.
6 - Users can ask for open a link in a different window/tab.
7 - Address bar doesn't show the "real" page you are in. So, you can't copy the location and send it to a friend or bookmark the page.
8 - If you want to monetize the site, you can put some advertisings. As you don't refresh entire page and you want to change the ad after some time, you have to refresh only the DIV where the ad is. But this can violate the Terms and Conditions of your ad service. In fact, it can go against AdSense TOS.
9 - When you refresh an entire page, all JavaScript gets "cleaned". But in Ajax calls, all JavaScript objects will remain.
10 - You can't easily change your CSS properties.
I'm looking for a decent open source salon management system to recommend to a friend. I've considered writing a new system in .Net but the website aspect is already covered. What's really required at this stage is an decent reservation and stock management application that I could put in place for them.
If there are recommendations for commericial pacakages which are reasonably priced I would also like to hear them.
Thanks.
I want to use PEAR's HTML_Template_IT in one of my Wordpress page templates so I can separate the HTML from the PHP. I got it working, except I am not sure about one thing.
Wordpress's built-in function get_header() actually echo's HTML - so I can't technically set it as a template variable. Is this considered acceptable or is there another way to put the contents of get_header() in a variable?
Thanks!
Our system is written completely in PHP.
For various business reasons (which are a given) I need to build the reports of the system using JasperReports.
What architecture should I use? Should I put the Jasper as a stand alone server (if possible) and let the php query against it, should I have it generate the reports with a cron, and then let the PHP scoop up the files and send them to the web client/browser...
why isnt my object being created?
When I do it like so, I am told error C2065: 'AllReferrals' : undeclared identifier
as well as error C2228: left of '.push_back' must have class/struct/union.
If I put the list initialization before the class I get error C2065: 'AllReferrals' : undeclared identifier.
Thanks!
#include <iostream>
#include <fstream>
#include <regex>
#include <string>
#include <list>
#include <map>
using namespace std;
using namespace tr1;
class Referral
{
public:
string url;
map<string, int> keywords;
static bool submit(string url, string keyword, int occurrences)
{
//if(lots of things i'll later add){
Referral(url, keyword, occurrences);
return true;
//}
//else
// return false;
}
private:
list<string> urls;
Referral(string url, string keyword, int occurrences)
{
url = url;
keywords[keyword] = occurrences;
AllReferrals.push_back(this);
}
};
static list<Referral> AllReferrals;
int main()
{
Referral::submit("url", "keyword", 1);
cout << AllReferrals.size();
cout << "\n why does that ^^ say 0 (help me make it say one)?";
cout << "\n and how can i AllReferrals.push_back(this) from my constructor?";
cout << " When I do it like so, I am told error C2065: 'AllReferrals' : undeclared identifier";
cout << " as well as error C2228: left of '.push_back' must have class/struct/union.";
cout << " If I put the list initialization before the class I get error C2065: 'AllReferrals' : undeclared identifier.";
cout << "\n\n\t Thanks!";
getchar();
}
For the "q" (quit) option in my program menu, I have the following code:
elif choice == "q":
print()
That worked all right until I put it in an infinite loop, which kept printing blank lines. Is there a method that can quit the program? Else, can you think of another solution?
Here is an example of what i would do in vb:
Public Class Class1
Public Shared WithEvents Something As New EventClass
Public Shared Sub DoStuff() Handles Something.Test
End Sub
End Class
Public Class EventClass
Public Event Test()
End Class
Now how do i do this in c#. I know there is not handles clause in c# so i need some function that is called and assign the event handlers there. However since its a shared class there is no constructor i must put it somewhere outside of a function.
Any ideas?
Hi Everyone, I need excel automation expert here.
I have chart with x-axis contains label: Jan,Feb,Mar,Apr
and y-axis contains label: 10,20,30,40.
Chart type is Bar.
Can anyone show me a csharp code how to change to Bar color to different color if the month is Mar?
I hope you guy understand my question since I can't put the image on stackoverflow.
thank you
Based on following question
push notification service cost
I want to know, will my application receive push notifications if it is deployed via Enterprise deployment, and is there any limit of number of installations of enterprise deployment for push notifications, we currently have 10000+ users, but the application is only for the members and god knows if apple rejects it to put it on appstore.
Any code I've seen that uses Regexes tends to use them as a black box:
Put in string
Magic Regex
Get out string
This doesn't seem a particularly good idea to use in production code, as even a small change can often result in a completely different regex.
Apart from cases where the standard is permanent and unchanging, are regexes the way to do things, or is it better to try different methods?
We use self signed certificates on our intranet. What do I need to do to get IE8 to accept them without showing an error message to the user? What we did for IE7 apparently isn't working.
EDIT: IE7 wouldn't show any errors if I put the certificate into trusted root certification authorities. IE8 seems to show errors even with the certificate there.
I need a QDialog to send a signal to redraw the main window.
But connect needs an object to connect to.
So I must create each dialog with new and explicitly put a connect() every time.
What I really need is a way of just sending MainWindow::Redraw() from inside any function and having a single connect() inside Mainwindow to receive them.
But you can't make a signal static and dialogs obviously don't inherit from MainWindow.
i have a set of hyperlinks with href = javascript:method('category1') and likewise category2 category3 ...
I want to select hyperlink with href containing category1 so i have written
jQuery(a[href*='category1']) but dont know why it also selects hyperlinks with category10 category11 category12 ... also
I understand that category1 is common in all of them but 'category1' should'nt be do i need to put ' with escape charaters.
Do you use a global, catchall namespace for all of your extension methods, or do you put the extension methods in the same namespace as the class(es) they extend?
Or do you use some other method, like an application or library-specific namespace?
EDIT: I ask because I have a need to extend System.Security.Principal.IIdentity, and putting the extension method in the System.Security.Principal namespace seems to make sense, but I've never seen it done this way.
I want to put an unique image (1x1) on an e-mail marketing (not spam) of my client. Just like www.spypig.com, I'd like to use it to know how many people have actually read the e-mail. I guess I'll have to check how many times this unique image has been accessed, but I can't figure out how to do it.
So my question is: Is there a way to check how many times an image file was accessed using ASP.NET/C#?
Thank you
suppose we have a example.exe file.
we first put that file in a new folder
and then zip that folder with any zipping software,
Can we prevent that zipped folder upload in a website????
how can we do that???????????
i am publishing an app in vb.net. it's creating setup.exe and a folder called application files. i am told that setup.exe is stand alone and does not need any other files. is this right? because when i put setup.exe in a different directory it says that some files are missing.
Hello everybody,
I have two nested lists of different sizes:
A = [[1, 7, 3, 5], [5, 5, 14, 10]]
B = [[1, 17, 3, 5], [1487, 34, 14, 74], [1487, 34, 3, 87], [141, 25, 14, 10]]
I'd like to gather all nested lists from list B if A[2:4] == B[2:4] and put it into list L:
L = [[1, 17, 3, 5], [141, 25, 14, 10]]
Would you help me with this?
Hi,
I have a VerticalFieldManager that takes all my screen, and I want to put an HorizontalFieldmanager at the bottom of the screen (menu bar that appear and disappear like the WeatherEye menu bar) that overlay the VerticalFieldManager.
Any idea? I think it's something with overwriting the paint or sublayout methods but I have no clue how to implement this...
Thanks to Max, I have almost everything, but in my other post it resize the VerticalFieldManager instead of having the HorizontalFieldmanager overlaying it.
Thank you!
Hello Everyone,
Following is what i am doing:
- (void) applicationWillTerminate: (UIApplication*) application {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:navigationController.viewControllers
forKey:@"diabetesstate"];
}
- (void) applicationDidFinishLaunching: (UIApplication*) application {
NSMutableArray *state = [[NSUserDefaults standardUserDefaults]
objectForKey:@"diabetesstate"];
if (state == nil) {
//Will initialize a new controller and put it as root view controller
}
else {
[navigationController setViewControllers:state animated:NO];
}
}
What are the best IDE's / IDE plugins / Tools, etc for programming with CUDA / MPI etc?
I've been working in these frameworks for a short while but feel like the IDE could be doing more heavy lifting in terms of scaling and job processing interactions.
(I usually use Eclipse or Netbeans, and usually in C/C++ with occasional Java, and its a vague question but I can't think of any more specific way to put it)