Posts

Showing posts from April, 2010

How do I dynamically change the Perl module path? -

I have two different versions of the pell module. Currently, the important script uses the version of the module specified by the environment variable and the system depends on the various functions being run by different users. The user's environment will determine which version of the Pearl module was used. Now I want to change it in the version specified in the Perl script, i.e. depending on the options passed. Unfortunately, code like this: if ($ new) {lib "newdir" use; } Other {use "old"; } Use Module; does not work, Pearl simply adds newdir and olddir to @INC and then runs the script is. How do I specify a dynamic mode to use? You must use a BEGIN {} block of your If - other code will be executed at compile time: BEGIN {if ($ new) {unshift @INC, "newdir"; } Else {unshift @INC, "old" ;; }} Usage module; You can also set environment variables so that you do not have to do this type of configuration in...

python - py2app and xml.etree.ElementTree -

I am trying to prepare an app that uses some of the XML data by using Python's built-in xml.etree.ElementTree class uses it. It works properly when I run from the command line, but when I make it, I get an error, "ImportError: No module entry. Elementary" I'm assuming this because I think that module properly I am not importing, but I did not understand how when I use the "included" or "package" instruction, py2app complains with the same error, and when I specifically purchase package_dir (/ System) / Library / ...), I compile it, but still gives me an error I have included a short example to illustrate this problem. Import Elementitry from Xml.etree.ElementTree macxml.py if __name__ == '__main__': tree = ElementTree () print tree.parse ('lib. Xml ') should print it on "xxxxxx> Element Library"> where is the library root name. Set up setup setup from (name = "Mac XML Test", app = ['macxml...

json - String formatting c# decode? -

I have a string that looks like this '% 7B% 22id% 22% 3A1% 2C% 22name When it is read from a cookie, it is actually a JSON object and it is {"id": 1, "name": "jim"} / Code should look like> Do I need to show the string in the right JSON notation of HTML? Thanks, look into the system.Web

Django Admin: Customizing the inline template (tabular.html) -

I'm trying to follow the guidelines, but I stuck with a way to edit the template. I admin.py : Segmentformset = forms.models.inlineformset_factory (Division segment) relevant class Divijnform (forms.ModelForm) part: def __init __ (self, ** kwargs): Super (DivisionForm, self) .__ init __ (** kwargs) self.segment_formset = SegmentFormset (eg = self.instance, data = self.data, prefix = self. prefix) def Is_valid (self): return (super (Divijnform self) Kis_valid () and self Ksegment_formsetkis_valid ()) save Diarf (self Commission = true) Save: commit == true res = super (Divijnform , Self) . Save (Commit = Committee) self.segment_formset.save () returns class category Inline (admin.TabularInline): Model = Division form = DivisionForm template = "events / admin / tabular.html 'class CompetitionAdmin (VersionAdmin): inlines = [DivisionInline ,] I template relevant part: {% et for fieldset Inline_admin_form%} on {% line in the field =%} {% For field in% field} ...

windows - Creating or Modifying SecurityDescriptors in Visual C++ 6.0 -

OK, I have Windows Dev platform, a copy of Windows XP box and Visual C ++ 6.0 I am trying to create or modify a security descriptor for the service. My initial idea of ​​other answers (and some reading) was that I should use the Constworth Street Security descriptor security agencies to set up my security descriptor. except for this ... there is a shortage of headers for this function to install my VC ++ 6.0 (according to SDDLH MSDN). Is anyone protecting me / narrator? I would be happy if I could run through an existing (I QueryServiceObjectSecurity) and just finish a few users, but I can not understand how to do this, which is just looking at MSDN. Alternatively, if someone can tell me in the direction of calling this function without proper headers, then it will be fine. A clear answer rebault: I can try to get IT to install a new version of VC ++ on my system, but the last time I got anything related to IT Asked if he took 7 weeks to answer. Since I want to do this in t...

Silverlight - Displaying Hierarchy of tabular data -

I have some data that I am displaying in a DataGrid, this data has multiple properties, which are the data grid columns Represent. One of these properties is a collection of another type of institution. When a user selects an item in the datagrid, then I want to show the collection of entities in a tabular structure. In a sense, I'm looking to create a DataGrid inside the RowDetailsTemplate of a DataGrid. I'm not set to use a datagrid, I'm just using it because it's just a kind of control that I know about That table can display information. My problem is, I do not know how to create an XML while addressing this kind of compelling structure. Can someone show me some code or point me to a code example? Thank you!

escaping - Ruby gsub doesn't escape single-quotes -

I do not know what's going on here, how do I feed the jib to get the string "Yaho \ 'o? / P> & gt; "Yaho'o" .gub ("Y", "\\ Y") = & gt; "\\ Yaho'o"> & gt; "Yaho'o" .gub ("',' \\ '") => "Yahoo" " \ 'means $ is' which is everything after the escape escapes again And it works "Yaho'o" .gsub ("',' \\\ '' ')

c# - download a file from server and then delete on server -

Ok I am downloading a file from one server and I am planning to delete the file But I downloaded it on the server downloaded on the client side. My download code is working fine, but I do not know when to order the file to be removed. string filepath = restoredFilename.ToString (); // FileInfo myfile = new FileInfo (filepath) Create a new instance of FileInfo class to get the properties of the file to be downloaded; // If the file exists (myfile.Exists) then check // // Clear the response content Response.ClearContent (); // Add file name and attachment, which will emphasize the open / cancel / save dialog box to show in header response. Adharer ("content-displacement", "attachment; filename =" + myfile. //Response.AddHeader ("content-disposition", "inline; filename =" + name = myfile); // response header add file size in reply Response.AddHeader ("content-length", myfile.Length.ToString ()); // ContentType Response Contact Typ...

Drawing a tournament bracket (CSS/HTML based on PHP Dataset) -

If you are not familiar with what I mean with the tournament bracket, see here: that Said, I have created a dataset and have figured out the number of rounds (rooftops ($ numplayers, 2)) and it is easy for me to get the number of players in every round, etc. What I want now I am transferring my own ranks into a bracket for each round in one match. It should be css or tape, I can play with the design myself, I am just wondering how should I go about creating this scene (can be a number of variables during the tournament round). Thank you! You can go with the table and line the appropriate rowspan s It's easy to set up on the bracket, but by saying something correctly will not say right. You can do this by calculating this proper condition and using it fully deployed to look like a bracket with cssad layers. Note that unless you take it from Javascript, this approach will not be fluid. . Finally, you can do this with nested lists, as stated, but it is very dirty....

Develop on mobile phones(Java), using SDK or not? -

Recently I would like to develop on mobile phones using Java and I plan to develop the following brands Nokia Samsung Sony Ericsson Motorola LG I Looks like "developer site" and thinks that he has provided his SDK for the development of JSME. I am really new in this area and I have a few questions: Since they support all Java platforms, we will be able to add additional Java SDK Why is the need? What can I gain from SDK? Does it determine whether I should use the SDK or not? It all depends on what you have developed How complicated applications will be. It is possible to develop a basic application to run on many different handsets, but the complexity will increase rapidly with every advanced feature you add, especially if you are using existing, old and incoming devices Want to target. Whatever you have to think is that each manufacturer can support many operating systems and platforms. Nokia's series 40 (3rd and 5th edition), s...

regex - Parsing a multiline variable-length log file -

I want to be able to use a 'grep' or 'pcregrep -m' solution that parse the log file There may be multiple rows in each log entry length The first line of the log entry is the key that I Every key appears on one more line So in the example below, I would like to return each row to it on which there is a key on it and until next log message there are all the support lines below. log file: 01 February 2010 - 10: 39: 01.755, Debu - KA1: Rendextx blah blah 2 t blaza t t bla 4f blah 5f blaza 6 bw 7 01 February 2010 - 10: 3 9: 01.757, Debug - Key 1: Somethngelse 01 Feb 2010 - 10: 39: 01.758, DEBUG - KEY2: randomtest This is a test 01 February 2010 - 10: 39: 01.760, Debug - Key 1: More logs here 01 February 2010 - 10: 39: 01.762, Debug - KEY1: eve and this other multi line log entry continues but no longer 01 Feb 2010 - 10:39: 01.763, debuts - KE2: Tess Test Test Test and Off of 2 Feb. 02, 2010 - 10: 39: 01.762, Debug - KA1: Key 1 is still going and going and go...

java - Is it possible to get the previous day of the week using Joda-Time? -

I'm new to add-time and was looking to get the last working week / day. My initial try was done on Monday and I wanted to get a date for T1 which would be Friday: DatetimeJohn Area = DateTimeJon. Ford ("Europe / London"); Chronologie Coptic = GJcronology.Just instance (zone); DateTimeDT = New DateTime (Coptic); DateTime Minnesound = dt.minusDays (1); System.out.println (minusOneDay); But as I hope that returns date on Sunday, does anyone know how to go on the last week? Thanks in advance .. This Joda does not seem to deal with time. is a source project that looks to handle it.

javascript - Loading images on a web page using mootools when user scrolls page down -

Does anyone have a library that will automatically load the images as a user scroll? The idea is that when the viewport changes, I want to add a user avatar to a wall. The related HTML would look something like this: & lt; Div class = "comment" & gt; & Lt; A class = "avatar" rel = "nick" href = "user / nick" & gt; & Lt; / A & gt; & Lt; P & gt; The comment goes here & lt; / P & gt; & Lt; / Div & gt; When the user scrolls down the page, then the HTML has to be changed in the following way: & Lt; / A & gt; Additionally, it is possible to cache images to minimize traffic backend, if possible, See also by David Walsh by a different author.

ssas - Automatic hyperlinks in Excel? -

I am exposing data from an SSAS server in which users can connect to any device, (usually practice In Excel 2007). We want to provide URLs in some cells and recognize Excel as hyperlinks and want them to be active and formatted. When we put a cell in a cell, it is presented as plain text only if you touch the cell and then click again, then Excel will have a link form Activates in. The same behavior occurs when you directly source data from a SQL or CSV file, there is nothing special about using our SSAS here. Do anyone know one way to make these render as an automatic link? We have no control over the generation of spreadsheets, so macros are out. Edit: It's a good thing to get a response from meff, though I forgot to tell that the place we are displaying in the URL is in the goal of drillhouse action. I do not believe it would be possible without a macro. An Excel cell does not have to do anything with the value of a hyperlink, it is a separate object that is...

Is it possible to call a WCF Service hosted in a Windows Service within SharePoint? -

I have a hosted WCF service in a service in a service where I have a WCO is a console call it well apply, but if I call it in SharePoint from a page, so it throws a timely exception. I added the following configuration to the web configuration: & Lt; Security mode = "message" & gt; & Lt; Transport Client Credential Type = "Windows" Proxy Credential Type = "None" realm = "" /> & Lt; Message client credential type = "Windows" conversation Sewakardifik = "true" Algorithmsait = "default" install Krensurcshacontekt = "true" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / WsHttpBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; endpoint address = "http: // localhost: 8000 / replication / service name" binding = "wsHttpBinding" bindingConfiguration = "WSHttpBinding_IReplication" contract =...

zend layout - PHP: Zend_Layout: Where to write business logic? -

On most projects, I use multiple layout scripts. Sometimes I need some data in my layout, instead of the page-specific layout-specific though the layout is used, the ISS is page-specific. Therefore the bootstrap or the action constructor will be good locations for selection of layouts. But IMHO would be a good place to inject the not data, expect a special layout. I can think that there is only some other business logic in the layout idea sheet in place. Although there is something that I want to do :) Where do you write your layout-specific business logic? - UPDATE : Layout-specific business logic can occur; Currently logged in user's username Number of new messages in the user's message Inbox Random "Did you know ..? ? " Tip This type of content is best done with ViewHelper class ViewHelper_RandomTip {public function randomTip () {$ tip = TipsModel :: getRandom (); Return " Random Tip $ Tip & lt; / div & gt; ; ...

Monitoring WCF web services -

I am new to WCF and I have deployed a web site with IIS7, in which 2. SVC files are on each SVC files, there is a service with some methods available through the interface. What I have to do is to know how many times each method is called and which calls each method. I would like to be able to store these values ​​in a DB for example, if it is possible to monitor my custom, but without logging in to the services. Do you know how I can do this? Thank you in advance for your help. You can turn on tracing in WCF. You do not need messaging logging You can apply custom tracing that logs in to DB instead of an XML trace file. The best bet in the future is probably hosting the WCF service, which was used by the appfabric framework that was introduced in .NET 4.0 on Windows Server 2008 R2. Appfabric provides an IIS extension that can be configured to trace and log WCF calls for a SQL Server DB and monitors the Dashboard in the IIS Admin Console. more information. Depending o...

c# - BackgroundWorkers never stop being busy -

के लिए (यह कई गुना करते हैं) {while (backgroundWorker1.IsBusy & BackgroundWorker2.IsBusy & amp; ; और पृष्ठभूमिवर्कर 3। आईएसबीसी और amp; पृष्ठभूमि वर्कर 4। आईएसबीबी और पृष्ठभूमि वर्कर 5. आईएसबीसी) {सिस्टम। थ्रेडिंग। थ्रेड। नींद (0001); } If (! BackgroundWorker1.IsBusy) {backgroundWorker1.RunWorkerAsync (); } और अगर (! BackgroundWorker2.IsBusy) {backgroundWorker2.RunWorkerAsync (); } और अगर (! BackgroundWorker3.IsBusy) {backgroundWorker3.RunWorkerAsync (); } और अगर (! BackgroundWorker4.IsBusy) {backgroundWorker4.RunWorkerAsync (); } और अगर (! BackgroundWorker5.IsBusy) {backgroundWorker5.RunWorkerAsync (); }} यह पांच गुना (प्रत्येक बीजी-कार्यकर्ता एक बार) चलाता है और उस समय में फंस जाता है। क्या पृष्ठभूमिवाले कभी व्यस्त नहीं रह जाते हैं? मैं उपलब्धता की जांच कैसे करूं? ध्यान दें: इसमें 5 कार्यकर्ता धागे हैं, यह आश्वासन देता है कि उनमें से कोई भी कभी भी रोका नहीं गया है, हमेशा उन्हें काम बताता है। लेकिन वे मुझसे कहने से इनकार करते हैं कि जब वे उपलब्ध हैं, तो मैंने सोचा था...

java - Unable to open socket connection with J2ME application on HTC P3400i -

I am unable to open socket connection with J2ME application on HTC P3400i. I am able to use the same application Nokia phone Is Nokia doing a good job on a phone? Can someone help me? Socket on mobile phones is not very reliable Use of HTTP, if possible, is a better bet if .

ibm midrange - How to clear the screen on an AS400? -

Is there any way to clean the screen in the RPG for AS 400? I clrscr () c. Looking for something with the same result You clear the screen with the RPG , But it is not like clrsrc () The RPG does not directly address the screen. You work with a device file aka display file (DSPF). The standard way to create that file is with DDS source and DDS compiler (always available on AS / 400). DSPF has one or more records. The RPG program writes or reads these records. If you write a record defined with the keyword CRLR (), then your screen will be clear. Also read about the overlay () which goes hand in hand with this keyword. All information is described in DDS I think that you need to start with understanding the system. (It is quite simple but requires a little reading.) Disclaimer: There are more ways to do this (including dirty and dirty tricks). But RPG + DDS is the preferred, standard and most used way in the world of iSeries.

c# - Refactoring PropertyChangedEventHandler -

In my UI code I have many sections with the same basic skeleton: InotifyPropertyChanged has the following code: Zero NotifyPropertyChanged (string information) {if (PropertyChanged! = Null) {PropertyChanged (New, This is New PropertyChangedEventArgs ( Info)); }} Private Event PropertyChangedEventHandler PropertyChanged; It seems that there is a right opportunity to create a factor in a class and get it from it instead of InnProperty, but sadly C # does not support multiple succession, so it's not really going to work, any ideas about how to reactify this kind of code? Would you like to code this superclass to your superclass? The object Your concrete notification was changed to the category & lt; Insert here Whatever your view inherited from Modable (and you stopped using many heritage Your concrete viewload Another concrete view MODEL Most MVVM frameworks provide such a category for you. Due to the rules of reaching around the event...

class - What does the syntax mean in Java: new Stream<Integer>(){ ... }? -

I have encountered the following Java syntax, which I do not know. This part is fine: Public abstract class stream & lt; T & gt; Uses the IETATOR & lt; T & gt; {Next in Public Boolean () {Back is true; } Public Zero removal () {new runtime exception ("unsupported operation"); }} But I do not get it: stream What is this? This is providing an inline (anonymous) stream class sub -category. Functionally, this is the same: Public nuclest stream {public integer next} {return 1; }} and zero something MethodInAnotherClass {stream stream = new NewClass (); } But the definition method of this class is not used outside the body, you can define it as an anonymous form.

Android app that needs to use non-memory SD card -

I'm planning to make an Android version of my iPhone app. One of the attractions is the availability of a micro / miniSD card from the SPECKACACK, in which it has an anti radio to communicate with the ANT + protocol devices. This technical viability is not my question; Rather its pragmatism: This is clearly involved in carrying out SD memory cards in the handset and instead of on-board storage place, with only 256 MB of device or whatever This is enough for my app, but I am worried that apart from annoying users by removing all their music, there will be apps on users' devices, which can save data in SD and save SD memory Will break Lne. Can anyone give any opinion on this issue? TIA itemprop = "text"> Most Android devices have media slots nowadays, from which The device needs to be switched off and the battery is removed to swap the card. This means that unless it is technically feasible to swap the card, it is uncomfortable that users do not want...

database - Advice on data capture management system -

I am looking at the potential work to include quite a critical data capture and management site and am wondering how best Approach this. I am using an LAMP architecture. The backend will be included in this: User created a user through the uploaded CSV file - Before I'm confident about this part, I did it. Once registered, the user will submit confidential information on a regular basis even though the data is confidential, I am planning to store it in a MySQL database only, which will be backed up on a regular basis. There will be different roles: An administrator who monitors user activity and creates new roles and user accounts where necessary. End users - who will provide information through the form only, the ability to edit their profiles, past submissions and other basic stuff like View management users - which can run a series of pre-defined reports on the data and display this information, they can also take "free-form queries" on the data...

javascript - $(window).load() works differently on IE and FF -

I was working with $ (window) .load () ... A Problem . Actually, the first window should be loaded according to this function and then any implementation under this function should start working. It works fine for IE but not for FF. This is working in FF like $ (document) .ready () Any alternative option, or due to this, FF behaves like this, can suggest. Your second method is the preferred way of working for both FF and IE: Pre> $ (document)) .ready (function () {/*.code.*/}); or short-hand form: $ (function () {/*.code.*/});

Java Class Architecture for swing GUI programming -

I am writing an application that requires a large amount of swing GUI components. I have a lot of difficulty in organizing classes: Is systematic and systematic layout a method of class architecture? In addition, I have many anonymous and internal classes and my main square has become bloated. However, when I put internal class event handlers in different files, I am having trouble reaching the components of my main category. Is there a method to organize large swingયુwag applications internally? In the big swing projects, I become part of the app such as: A GPI element, such as JPNL, JDILOG etc. Use a different package for each screen, especially if you have to apply customized table fields or other complex data structures Do not use anonymous and internal sections, rather than an action listener and check ActionEvent.getActionCommand () there.

authentication - Auto logging in to another ASP.NET Application from main Web Application -

I'm running the latest version of molecule foam in a folder below my main WebApic subfolder in an application in IIS As is configured and navigated into the folder and logging in the work is fantastic YAF is setup with a subscription provider and uses the form authentication. What I'm trying to do now is that the user is automatically logging in to a forum from the main user, using custom authentication through the main website sessions and cookies, any ASP Net authentication or subscription components are not manufactured. So what I want to do basically is that when a user clicks the link to access the forum, they are sent to the processing page which certifies him in the YAF application. Before it sends the subfolder. Although the main app does not use the built-in authentication piece, I can still make the authentication mode for the form and make sure that it is on the WiFi web web. After that, I'm calling FormsAuthentication.SetAuthCookie (username, true) on ...

cakephp 1.2 - Cake PHP - Form Validiation doesn't work -

My Cake PHP (1.2.5.) Does not validly validate my form. $ this-> UserData- & gt; Save ($ -> -; data); Always gives me a true value. I do not find the problem the label works for UserData.nichname. This is the view: Here's my controller: class UserDatasController Extends AppController {var $ name = 'UserDatas'; Add function () {if (empty ($ - this-> data)) {$ this- & gt; UserData-> Create (); If ($ this-> UserData-> Save ($ -> -> Data)) {$ this- & gt; Session-> Set flash ('input is valid'); } And {$ this- & gt; Session-> Set flash ('input is not valid'); }}}} are not in the model model, that reaseon I do not post it What else is necessary for verification? Thank you in advance ^^ Also check what your files say goes. Did you name your model file user_data.php correctly? And your controller user_data_controller.php? Note underscores due to your excellent casing If you find the name...

java - Custom Drawn Component Not Drawing Inside JScrollPane -

I was using Java JRE 1.6.7 and had a JCM apprent and a JScroll. I could not get double buffering to work on that which was always the result of a flicker. If I use canvas, then buffering has to be cared for, but it has to face when used in conjunction with JScrollPan. So I hope to download JR 1.6.18 that one of these problems OK that JComponent inside JScrollPane is not coming exactly at all. It only pulls out the area outside of JComponent, as if the JSolPan is pulling it upwards except the boundaries. Here is an example of a code which is not drawing..It is a 1-pixel wide area of ​​area where the drawing should be: public zero color ( Graphics arg0) {Graphics2D graphics = (Graphics2D) arg0; Graphics.setColor (Color.WHITE); Graphics.fillRect (0, 0, (int) getWidth (), (int) getHeight ()); Any help is greatly appreciated! Try to make override with paintComponent (graphics g) instead of Colors (Graphics G) . Paint is a common method that you have to override for co...

How safe are SQL Server 2005 MDF files? (re: security) -

We have started using SQL Server 2005 Express for a project and I have found that in every database its own The MDF / LDF file is whenever we need to duplicate our database (the second SQL Server), we only copy these files and then attach them to the database. However, I am thinking about the security of these files, if someone from outside receives a copy of them, do they encrypt or can they just attach to them as I am doing? Am I Thank you, John They are not encrypted and can be used by any person by the MDF / LDF files can be loaded / attached with read access. The actual MDF files are required to be protected, so you can take some approaches that you can. (It assumes that it is not possible to use file permissions to lock access, for example if you need protection against users with administrative rights to the machine or direct HDD access.) Use EFS or Encrypting files with bitlocks or files themselves in the same session / references to access files, there is no ...

java - Faster asymmetric cipher than RSA -

I am working on a system that uses asymmetric encryption in a large number of files. I am using RSA with 4096-bit keys to encrypt a 256-bit randomly-generated AES key, but there is a lack of performance, because an operation required for all files (estimated number of scans during scanning To do ) Use is about 10,000) and identify how can be decrypted using a specific private key, though I hope this operation will not be immediate, it is taking too long (~ 2 files processed per second) ). I considered reducing the important length, but even taking it to 2048 bits does not provide the level of performance that I need, it will be about 512 bits to be deducted, but as the keys are still trivial Which are out of the question. Does anyone tell me in the direction of the system that is fast, but the same cryptographic strength? This will need to be implemented by Java JCA provider (like some Bouncicastel) to plug my existing application neatly. I know that the bouncy palace supports El...

mysql: possible loss of UTF data from char to text field type conversion? -

I have a database that I use for a foreign language / glossary web application and with it phpMyAdmin (and of course Php). I had about one thousand rows for Arabic text, which were kept in four areas. I wanted to expand the size of my entries, so I read that a text field could find me before the limit of 255 characters. I changed the field type to text - and now all Arabic entries were now displayed as question marks, crap etc. I have worked with that type of display in the whole site's design, to ensure that all the character sets are correct, and it is performing well for months of this change. I returned all the structure of the table to the best of my knowledge in its original state, and the problem persists. This is a very destructive loss, and I am basically thinking whether these lines have not been given only, or if I'm not just resetting things properly, how to get this data back, its Any thoughts about? Many thanks in the very beginning You may find that ...

cocoa - iPhone Core Data: Do Transformable Attributes have to Transform to only Data? -

I took ... The idea behind the convertible features is that you access an attribute as a non-standard type, but the core data behind the scenarios is one of the NSValueTransformer To use the example, to change the attribute and an example of NSDT, core data then stores the data instance in the store continuously. ... This means that you can only convert things into data and other types of attributes like string It just happened to me that this matter may not be the case, the documentation will only be talking about the most common case. In the IIRC, cocoa binding, conversions can be largely arbitrary. To change the NSSRIRL for performance, say, it is possible to do NSSRR and then reverse it. Before I wasted time to experiment and possibly getting a misleading result, I was surprised if someone knows that the transformations are from data and only data. Correct you have to change your property in the NSData object You must serialize NSURL to ...

wordpress - Does Wp-Ecommerce works with LinkPoint gateway? -

I have an online store working with osCommerce, really works fine. But there is no integration with the store blog in WordPress cheaply. Now I have seen a new payment plugin called WordPress - WP-Ecommerce, so I decided to migrate the entire store from WordPress, can be treated like a CMS to create SEO position for the store This plugin is really easy like Meta Tag properties for each plugin. I am reading about wp-ecommerce and searching through web to find an opportunity to integrate it with linkpoint, which is my client's store gateway. I must say that this is a mandatory requirement that I To transfer the whole site to WordPress, you have to do it Does anyone make it possible? Working with WordPress with LinkPoint? It seems that it currently supports only. You may want to check out the LinkPoint plug-in is not free but it is available.

security - How do I implement salt into my login for passwords? -

I want to apply a salt to my login system, but it is a bit confusing how it should work. I can not understand the logic behind this I understand that MD5 is a single algorithm and all functions that I have found are all looking for hash together. If this is the case, how do I get my password back for comparison? My biggest question is how safe is it to secure a user's password through password? If a database was ever compromised, then there is a hash with salt in the database. Is not it that a hacker is needed? I have found another post here, where another developer said: "Make sure your salts and algorithms are stored different from databases I would like to store salt in the database. Is this really a problem if I do? I'm doing some help in understanding this I know how it works and also what best practice can be. Any help is greatly appreciated. It is. EDIT: I want to thank everyone for your responses and thoughts, although I can now be more confused, i...

c# - How long does it take to create a new database connection to SQL -

Does anyone offer me a Ballpark timing (in milliseconds) how much time to set up a new DB connection from SQL It seems C #. To wit. When a connection pool should create a new connection, then what is an overhead. It depends: Time to resolve TCP socket or open pipe time (at the top of other TCP soket): 3 IP packet usually encryption is required, then SSL / TLS Time to Swan: ~ 5 roundtrips and SSL / TLS key information are not reused (like an RSA private key access, which is very expensive) Master Key Time to bootstrap Exchange Time to authenticate SQL passwords for SQL authentication (2 roundtrips that I believe) To authenticate NTLM / Kerber for integrated athlete Time (1 round trip SPNEGO, if you have a curb ticket to negotiate with 5-6 roundtrips Time to authorize logins (lookup metadata, permissions against login token To run any login trigger at the moment possible The time to start the connection A few more esoteric times: If the time has been set t...

asp.net - ObjectDataSource not calling Insert method when it has extra parameters -

I'm new to ASP.net, and I'm trying to implement a custom objectadressor insert method. The default business method works fine (with an object parameter) However, when I add an additional parameter, the business method is not called. Here is my code - Insert () is always called, but never included () is never included. // Business Layer Public Class MyObject {Public MyObject () {} Public String Foo {get; Set;}} Nameshot Mylogic {Public Static Insert (MyObase M) {// ... Insert DB} Public Static InsertWithParams (MyObject M, String P) {// ... more fancy DB insert}} // MyLogic Looking at the following ObjectDataSource declaration, "InsertWithParams" and "MyObjectDS_Inserting" are never asked. However if "MyLogic.Instert" is specified instead, then it comes along with the incident. Apart from this, if I remove the p parameter from InsertWithParams, then it is called. and asp: ObjectDataSource runat = "server" id = "myobje...

oop - Which design pattern does this? -

I have a small question about design patterns I have 2 classes which They are very similar to class (theory), they primarily work in the same way and work, but now they have different characteristics. I want to make a cover which exposes the expressed properties of 2 squares, I remember that there was a pattern for it, but I was looking at this book and just did not get it. What I'm trying to do basically is map attributes, although I often use the same method (save) for each of my classes after collecting their data on different tables I do not want to write a complete code for each couple of those classes, because there are lots of things going to happen. I will add a simple example to make myself more clear Let me introduce this 2 class of material theory - record {Int content_id; Date of making date; revised date; Int number_click; Content_translations translations []; } Class Content_translations increases theory; {Int translation_id; Int content_id; String langua...

asp.net - Displaying data conditionally within a user control -

एक asp.net उपयोगकर्ता नियंत्रण के भीतर मेरी यह रेखा है: & lt; div & gt; वेब: & lt; a href = "& lt;% # Eval (" वेब ")% & gt;" & gt; & lt;% # Eval ("वेब")% & gt; & lt; / a & gt; & lt; / div & gt; मैं इसे बदलना चाहूंगा, इसलिए यह HTML केवल तभी प्रदान किया जाता है यदि वेब का मान होता है। मैंने रैपिंग की कोशिश की है यह करने का सबसे अच्छा तरीका क्या है? P> यह एक वैकल्पिक हल का एक सा है, लेकिन आपके आइटम के शीर्षक टैग में एक छिपा हुआ फ़ील्ड हो सकता है: & lt ; Asp: HiddenField ID = "HiddenField1" runat = "server" मान = '& lt;% # Eval ("वेब")% & gt;' / & Gt; आप फिर 'सर्वर' को 'रन' के गुण को 'सर्वर' पर सेट कर सकते हैं और एक आईडी को div दे सकते हैं। & lt; div id = " वेब: & lt; a href = "& lt;% # Eval (" वेब ")% & gt;" & gt; & lt;% # Eval ("वेब")% & ...

php - Group a multidimensional array by a particular value? -

Hopefully, I can explain it correctly ... I have a multi-dimensional array And I am trying to make them groups according to the value of keys Therefore, I am trying to group them on the basis of the level, but in reality I do not already know the level. So, it's not like I can put it in the loop and say $ i & lt; 7, because I did not know that the maximum value for the key of the level is 7, and, obviously, I'm not sure that I would need to do this, even if I did ... [Code] array ([0] = & gt; Aare ([customer] => XT8900 [type] => standard [level] => 1) [1] => Hey ([ Cust] => XT8944 [type] => standard [level] => 1] [2] => array ([cust] => XT8922 [type] => principal [ Levels => 3] => [Sir] => Standard [Level]; Array ([Customer] => XT8816 [Type] => permier [level] = & Gt; 3) [4] = & gt; Hey ([cust] = & Gt; XT7434 [Type] => = & Gt; 7)) What I'm hoping to produce: Array ([ 1] => Array ([0] ...

visual studio - What is the best practice to Jump out of closing bracket in Resharper? -

This is good when the resharper inserts the bracket automatically closing the closing. But assume the condition that in this situation there was no parameter in this situation because it takes more time to exit the bracket, is there a job? Now I use the mouse to jump from the clashing bracket. You can turn it off by going to Resharper Options / Unchecking and "auto-inserted pair brackets, Brackets, and quotation "I personally use the right arrow keys.

.net - Does sketchflow have a layout container? -

All I see as a rectangle. What I want to do is a panel and control it (buttons, textfield, etc.) and then when I take the panel, the control goes with it any thoughts? Yes you select all the objects, right click and group -> grid

How to send post data to any url (with redirection) without using curl or fsocket in php -

I think my page will be redirected with some post data sent to some URL. I do not want to use curl or fsocket because they will not redirect the user to that new URL. Is there a substitute for header ("Location: Blblblah"); To send post data? I tried with document.form.submit (); And it worked but some users are experiencing problems with Javascript. Can anyone provide workaround for this? Thanks in advance.

java - Registering Namespace in AllegroGraph(Registed nameSpaces is missing.) -

I have a problem about entering a namespace in Alegregraph. My Java code (Program 1): AllegroGraphConnection agc = New AllegroGraphConnection (); Agc.enable (); Alegraigraph AG = Escrit ("Test", AGPiths. RIPLEAS); AGUtils.printStringArray ("Ag Namespace (Initially):", ag.getNamespaces ()); Ag.registerNamespace ("foaf", "http://xmlns.com/foaf/0.1/"); Ag.registerNamespace ("DC", "http://purl.org/dc/elements/1.1/"); Ag.registerNamespace ("dct", "http://purl.org/dc/terms/"); Ag.registerNamespace ("exif", "http://www.w3.org/2003/12/exif/ns#"); Ag.registerNamespace ("prf", "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-2007511#"); AGUtils.printStringArray ("AG Namespace (Registered):", ag.getNamespaces ()); Run , and the results (Program 1): AG Namespace (initially): 0: rdf 1: http://www.w3.org/1999 / 02/22-RDF-Sentence-NS # 2: rdf...

sockets - TCP programming with .NET -

I am having a problem with socket programming job I have written a TCP customer who sends commands through sockets / networkstream is. I am using to see the raw data that goes through the stars. Every time I send a "command" (i.e. flush (network stream)), the wirhark application tells me that the checksum in the TCP header is incorrect ("It should be 0x2440 but should be 0x0000.) I get ACK back I do not understand why I will have to take care of the TCP header at the application level. This can not be true. Can anyone know why I am getting this "error"? I do not know about which I am using Net 2.0 sockets with TCP. Thanks. Are you looking at Warhorck, which is sending the data, it can be dump from the machine? If so, then it is possible that checksum is not taken in the stack at the point where the wireershark is watching it. Many network cards these days are TCP checksum offloads, where checksome hardware Security is, and therefore checksum field will...

s60 - akntextutils and LFDM PyS60 Installation Help -

I have found a project LFDM and a nottextults on the internet, however, I failed to install it on both my emulator and the phone I am Can someone help me how I can install them on both phones and my PC emulator? I tried to copy the source files on my computer: and even then I could not give them a reference on the emulator, then I tried c: \ symbian .. \ winscw \ c \ system \ libs and still I would refer In my applications on Emulator. I am currently running PyS60 version 1.4.5 and currently running the emulator series 60 second ed. FP3 LFDM contains s60 third binaries for extractables. For the 2nd edition version Binaries, go here: The correct package is: It will be the second ede binary, note that the binaries for the emulator and the device are different. Emulator binary wins are in the directory, tool binaries in Arabic directory. Copy the emulator from the win directory to a Symbian directory from akntextutils.pyd. I do not have the second ed emulator now, so I d...

java - How scalable is Jetty? -

Greetings! I wrote a high scalable HTTP event (Long Voting) server which was using libevent in C / C ++. However, this is a mess, it is rarely portable, and lets it face it: It is C. Be lonely that I have some major problems with mysqlcpp connector (which is full garbage), and libevent some small issues (this may be because I'm using 2.0.1-alpha) Event Server C / C ++, and the actual backend is PHP-FPM if I need to hit me (i.e. there is a new event). All proxy / CGI routing is done through NGNX. I am arguing about rewriting the whole thing (event server and backend) in Java - I like to use PHP for French-end. I have heard many good things about Jetties, but I am thinking that someone has experience of deploying the real-world highly-concurrent applications working on the Jetties backend. If so, how does this stack compare to an HTTP libevent implentation, or equivalent Erlang and Python server libraries? I am not interested in the apachebench criteria so please do not li...

networking - Trace Routing for a Certain port -

Let me tell you before I say that I am not well-educated int related topics I am a software developer and I wrote and posted a service on HTTPS on port 8000. Now I have to know that if there is a software that can help me find if there is any type blocking the port at one of my sites from one site with the information of the block host. I have tried some traceroutte software such as wintrace, but they all use ICMP protocol and there is no alternative to providing port numbers. And besides, I want to like an exception in the firewall for the ICMP protocol coming in the Windows Server 2003 window firewall but I can not see an option in the ad protocol for the exception, instead of advertising Only one option or advertisement is a port of Udp or TCP. Please help NMAP, my good friend will do this for you :) (see example below this page)

Screen scraping with Python -

Is there a screen scraping library in Python that offers JavaScript support? I need JavaScript support for Pycurl , and Java HtmlUnit . Ideally I want to be able to do everything from Python, but I have not come into any libraries which will allow me to do this. Do they exist? There are several options while working with static HTML, which cover other responses. However, if you need JavaScript support and want to stay in Python then I recommend render webpage (including javascript) and as a result the HTML is checking. For example: import signal imported from PyQt4.QtCore by PyQt4.QtGui import * QWebPage class render (QWebPage) from PyQt4.QtWebKit import: def __init __ (auto, url): self .app = QApplication (sys.argv) QWebPage .__ init __ (self) self.html = no sign. Signal (signal sign, signal SIG_DFL) self.connect (self, signal ('loadFinished (bool)', auto_finished_loading) self.mainframe (). Load (url) self.app.exec_ () def _finished_loading (auto, result): s...

c++ - Mixing extern and const -

क्या मैं extern और const को मिश्रित कर सकता हूँ extern const ? यदि हां, क्या const क्वालीफायर यह केवल उस घोषित दायरे के भीतर शासन करता है जो इसे घोषित किया गया है या क्या इसे अनुवादित इकाई की घोषणापत्र के अनुरूप होना चाहिए जो इसे घोषित किया गया है? अर्थात। जब भी वास्तविक i एक const और इसके विपरीत नहीं है हां, आप उन्हें एक साथ उपयोग कर सकते हैं। और हां, यह वास्तव में घोषित घोषणा यूनिट में घोषणा से जुड़ा होना चाहिए। जब ​​तक आप इसमें शामिल नहीं हैं: -) सामान्य पैटर्न है: file.h: extern const int a_global_var; फ़ाइल .c: #include "file.h" const a_global_var = / * कुछ const अभिव्यक्ति * /; संपादित करें: निगमित किंवदंतियों 2k की टिप्पणी धन्यवाद।

How to use Imagick php to generate a bmp file with a palette offset -

I am trying to use iMagic to generate 8bit bmp from jpg via phag. But I would like to start pixel colors on index 16 compared to 0. In the code given below, how do I generate BMP in the correct format, but the palette index is missing from 0. Is there a way to ensure that the palette starts in another index? $ average = new emacs ("icon.jpg"); $ Average-> setCompression (Imagick :: COMPRESSION_NO); $ Average-> quantizeImage (32, Imagick :: COLORSPACE_RGB, 0, wrong, incorrect); Image coloring (average, 0, 255, 255, 255); $ Average-> set format ("bmp"); Header ("content-type: image / bmp"); Rebound $ average; $ Average-> Clear (); $ Average-> Destroy (); I do not think Imagick has anything built for it, so you have to create a new palette (offset). Copy the old one with) and then use the $ pixel = $ average :: getImagePixelColor () and then $ pixel-> Getcolor () and $ pixel-> Set color () according to the new palette.

android - ImageButton selector doesn't work? -

I press the image button, trying to create a focused and normal state. I have read the introduction of the image button I have saved the selector XML file in / res / drawable / I also set android: src = "@drawable / my_silcutor" . my_selector.xml file: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item Android: Dragon = "@ Drable / Btn_onfocus" /> & Lt ;! - default - & gt; & Lt; Item android: state_pressed = "true" Android: drawable = "@ drawable / btn_onpress" /> & Lt ;! - pressed - & gt; & Lt; Item Android: state_focused = "true" android: drawable = "@ drawable / btn_onfocus" /> & Lt ;! - Centric - & gt; & Lt; / Selector & gt; I think I have made the right image button. Please give advice. "Itemprop =" tex...

php - MySQL query outputs odd rows only -

मेरे पास निम्न PHP विधि है जो एक MySQL क्वेरी से JSON स्ट्रिंग लौटाता है: $ Sys_words_ref_join_query = mysql_query ("चयन करें user_words। *, Sys_words। * से उपयोगकर्ता_वर्ड्स, sys_words WHERE user_words.sys_words_ref = sys_words.sys_words_ref और user_words.user_info_ref = '1' LIMIT 0, 7"); $ Json_array = array (); जबकि ($ words_obj = mysql_fetch_object ($ sys_words_ref_join_query)) {$ json_array [] = $ words_obj; } $ परिणाम = json_encode ($ json_array); प्रतिफल $ परिणाम; मुझे जो समस्या आ रही है वह यह है कि $ परिणाम केवल अजीब डीबी पंक्तियों को प्रतिध्वनित कर रहा है, उदा। 1,3,5 ..., आदि। किसी भी विचार क्यों? धन्यवाद। आपको संभवत: एक ( और ) का उपयोग करना चाहिए ( & amp; ) जहां खंड में: WHERE user_words.sys_words_ref = sys_words.sys_words_ref और user_words.user_info_ref = '1'

http - Why doesn't Firefox redownload images already on a page? -

I just read this article: A firefox behavior (and I think some other Browsers) I understand the way: If I take any webpage and try to insert the same picture several times in javascript, the image is downloaded only once, even if I want to say to all the necessary headers that "Never use Cash" (See article) I know that the work is working (such as the endquote query string at the end of the URL) but why Firefox works, if I say that There is no image to be cached, whenever I try to insert it again, then why is the image taken from the cache? Plus, is it used for cash? (I think this is a memory cache) Is this behavior only for dynamic inclusion for example? No answer :) I have just tested it and will redirect the same header to the JS script every time you attach the script to the DOM, then it will be redeemed by Firefox. PS: I know you're thinking that I need to do this (forced to add the same image many times and to download it again, but it's the ...

php - how to keep multi session live together -

Thank you very much and sorry to bother. I'm still stuck a PHP, trying to understand me There are some problems / working with knowing how to maintain multi session .. Here are my existing sessions eg session_start (); // If no session is present, create one if (! Session_is_registered ('lesson')) {$ _SESSION ['lesson'] = new lesson; } $ Lesson = $ _SESSION ['Lessons']; And then I want to add a new session from the code below: if (! Isset ($ _ POST ['languageselect'])) { $ Languageselect = $ standard language; } Other {/ * set standard language * / $ languageselect = $ _POST ['shylgiaject']; } // Andif if ($ languageselect == 1) {/ * my language pack * / $ languagearray = array (1 = & gt; "one", 2 => "two"); } Other {/ * English Language Pack (= Standard) * / $ languagearray = array (1 = & gt; "one", 2 = & gt; "two"); Function printoptionbox ($ boxname, $ cssclass, $ elementa...

Python: convert RTF file to unicode? -

I am trying to convert lines into a series of Unicode strings in an RTF file, and then a regex Match lines (I need them Unicode so that I can output them to any other file.) However, my ragex match is not working - I think because they are not being converted to Unicode. This is my code: usefulLines = [] textData = {} # regex pattern (such as SUF 76,22) for an entry in DB: it is for us Suffix is ​​enough to match three upper-case characters as well as a space entry. Pattern = '^ ([aged] {3}) [\ s]. * $ 'F = open (' textbase_1a.rtf ',' ur ') fileLines = f.readlines) # Get the milling line number, and save in useful lines for file (fileline): #line = line.decode ( 'Utf-16be') # This causes an error: I do not really know what file encoding is if R.T. In the file ... line = line.Secode ('Mac_Roman') is the print line, then re-matches (entropy, line): # Retrieve the following lines, all the way until we get blank lines print: + Str (i) Usef...