Posts

Showing posts from June, 2012

Smarty PHP/template output problem -

I have an issue on this page. For ($ i = 0; $ main night [$ i]! = ''; $ I ++) {$ query = mysql_query ("Choose ... from ... ou id = $ i") or die (mysql_error ()); While ($ tmp = mysql_fetch_assoc ($ query) $$ some [] = $ tmp; } $ Smarty- & gt; Assign ('content'. $ I, $ some); } I can do it manually {section name = i loop = $ stuff1} ..... {/ section} { Section name = I loop = $ stuff2} ..... {/ section} but not really good way. How just put your "content" into an array? $ stuff = arrray (); ($ I = 0; $ main [$ i]! = ''; $ I ++) {$ query = mysql_query ("Choose ... from ... where id = $ i") or die (mysql_error () ); While ($ tmp = mysql_fetch_assoc ($ query) $$ some [] = $ tmp; } $ Luggage [] = $ some; } $ Smarty- & gt; Assign ('content', $ accessories); Then you can just loop on the stuff in the template.

sql - Why grouping in a subquery causes problems -

When I include lines of 2 in the following subquery, it seems that this is my Sybase 12.5 ASE server then As long as there are no results, it continues till all time. The query runs fine without these 2 lines. How wrong is that grouping? preceeded day_played.day_played = days_received.day_received and days_played.dayer_id = days_played.day_received and days_played.dayer_id = days_received.user_id where days_received.min_bulk_MT & gt; Days_played.min_MO and days_played.user_id (Select sgia.user_id as the day is shown as sgia, where sgia.day_played & lt; days_played.day_played - by group sgia.user_id - amount (sgia.b_first_msg) = 0 Saving) group by day_played.day_played to show the explanation Does. In this case, can not you end the sub-division by making it part of the main question?

coding style - Java operator overloading -

ऑपरेटरों का उपयोग नहीं करता है मेरा कोड अस्पष्ट बनाता है। (aNumber / aNother) * count < / कोड> aNumber.divideBy (aNother)। टाइम्स (गिनती) से 6 महीने के बाद बेहतर नहीं है एक टिप्पणी लिखना मुझे ऊपर की सरल कार्रवाई के लिए एक टिप्पणी लिखनी थी। आम तौर पर जब तक मुझे टिप्पणी की जरुरत नहीं होती तब तक मैं पुनरिक्षक और इससे मुझे पता चला कि गणित प्रतीकों और संख्याओं को उनके लिखित रूपों की तुलना में पढ़ना और समझना आसान है। उदाहरण के लिए TWENTY_THOUSAND_THIRTEEN.plus (FORTY_TWO.times (TWO_HUNDERED_SIXTY_ONE )) 20013 + 42 * 261 की तुलना में अधिक अस्पष्ट है, तो क्या आप एक तरह से जानते हैं जब जावा में ऑपरेटर ओवरलोडिंग का उपयोग कर नहीं से छुटकारा मिलता है? अपडेट: मुझे नहीं लगता कि टिप्पणियों पर मेरा अतिशयोक्ति मेरे लिए ऐसी परेशानी का कारण होगा मैं मानता हूं कि मुझे 6 महीनों में कुछ बार टिप्पणी लिखने की जरूरत है। लेकिन कुल में 10 से अधिक लाइनें नहीं हैं इसके लिए क्षमा करें। अपडेट 2: एक और उदाहरण: budget.plus (bonusCofficient.Nimes (अंक)) < मुझे पहली

sql - rails named scope issues -

I have two designated scopes ... both of which work separately, but when combined do not work. Named_scope: Total,: Select => "As the COUNT (*) days, average (value) as the value, SUM (value) total" ,: group = & gt; : Parent_id name_scope: currency, lambda {| Code | {: Choose => Example: P> C = booking Total.currency ("EUR") Find_all_by_parent_id (63) The total designated scope works but the currency is not ... c = Booking.currency ("EUR"). Total.find_all_by_parent_id (63) Scope named design works, but not yoga ... Any thoughts? I think you have some problems. Both scope "define value" and they define conflict, this will generate invalid SQL One scope There is a group segment, but there is not an overall work on the non-classified feature in the second selection section, the result will be in the invalid SQL. Instead of the complexity of your class, consider using a math feature on your booking

python - IPython in unbuffered mode -

क्या आईप्याथन को बिना बंधाकृत मोड में चलाने का एक तरीका है? उसी तरह python Python के मैन पेज से: P> -यू ​​फोर्स स्टैडीन, स्टेडाउट और स्टेडरर पूरी तरह से बंधा हुआ होना चाहिए। जिन सिस्टमों में यह मायने रखता है, इन्हें स्टडीन, स्टडआउट और बाइनरी मोड में स्टेडरर भी लगाया जाता है। ध्यान दें कि xreadlines (), रीडलाइन () और फ़ाइल-ऑब्जेक्ट इरेरा-टॉर्स ("sys.stdin in line for") में आंतरिक बफरिंग है, जो इस विकल्प से प्रभावित नहीं है। इसके आसपास काम करने के लिए, आप "while 1:" लूप में "sys.stdin.readline ()" का उपयोग करना चाहते हैं। यदि बिना बंधाकृत मोड का उपयोग रीडलाइन के साथ हस्तक्षेप करता है, तो निश्चित रूप से सभी जादू संपादन और ऑटो-पूर्ण होने पर भी हस्तक्षेप होगा जो iPython आपको देता है। मुझे संदेह है कि वह कमांड लाइन विकल्प आईपैथॉन में क्यों नहीं है।

Sharepoint workflow vs Windows workflow -

We are in the process of implementing the SharePoint application, we would like to know the pros and cons of Virtual Versus vs. SharePoint Workflow Workflow. Workflow in SharePoint is implemented using the Windows Workflow Foundation, so they are no different, but There are still some things about that implementation. SharePoint is a Windows workflow host, so you do not have to implement your own host, if you sharepoint team: Workflow instances in the content database Communication with the user is done through SharePoint jobs Example of each workflow < P> If this option is for your choice then use SharePoint workflow in all ways. If not, apply y our own host and make your own decision.

apache - suPHP upgrade causing 500 internal server error -

I have a yum update my server every night last night, suPHP updated in the latest version: October 16 01:25:43 Updated: mod_suphp-0.7.1-1.el5.art.x86_64 This update is to throw a 500 internal server error to my website Caused the cause. The one that I have been able to find, I need to include the last two lines in quotation marks in my suphp.conf file, which I did. But after the restart of Apache, I still get the error 500. None of my files or directories is set to 777, so this issue is either not whether anyone else knows what has changed in the new SUPHP release Will not my configuration work anymore? Thank you. Log file logfile = / var / log / suphp.log; Loglevel loglevel = warning; User Apache is running as webserver_user = I = here: Apache; All scripts must keep the path in the docort. The path of chroot () before executing the script; Chroot = / mychroot; Security option allow_file_group_writeable = false allow_file_other_writeable = false allow_directory_group_writeab

c# - WCF Serialization & Interfaces -

What do I mean to implement solid implementation? Even if I am using svcutil with R / R, in which my entites (where IMyInterface is defined) are included. I have not received any error but it changes the list (IMI interface) in the list and I can not distill it on the client Error: changed the list to the list (IMyInterface) Regards _Eric < P> In short, yes. You will need to return a type of interface that implements the interface. While passing the interface there is nothing to be serial, there is no object to break and cross the wire, only the list of properties and the need to implement those methods.

c# - WPF in a browser and printing -

Can WPF be hosted in a web browser? if so, how? (I think that as I have seen some examples of this.) is hosted in the web browser, while what is printing support? What is the lack of using a WPF browser? My company is looking for a rich web app forum that they will not choose Silverlight because it reduces any printing requirements (at least as far as I understand). One of Adobe's solutions is the main reason why it supports printing. Most of the applications written for the browser (if not all) will be used internally by my company (i.e., we control computers and browsers). (We want to use the browser for easier deployment.) have you checked out (XML Browser Applications)? Major drawbacks I am aware of the security of concern when some of my colleagues were developing an XBAP product, they often went into problems with security, because the XBAP model is very strict. I can not answer the print, but I think there may be a problem in security considerations. H

Possible to disable javascript within a xul:browser element (firefox extension)? -

I have to present the submitted HTML to the user within an XUL panel. I am adding html to a XUL: inside the browser element panel so that invalid XHTML is not an issue (this browser has a sandbox in the frame). Is there no way to disable Javascript inside the XUL: Browser? My original plan was to write some regex which removes all JS from HTML, but if I can just disable JS and do not worry about it then it will be so easy. EDIT: OK, browser.docShell .allow JavaScript = false; Is what I was looking for. Unfortunately this only works when the browser type is set to "content", and if I set a type for "content": the browser does not render properly within a panel (known firefox bug which Has been around years). Without the content type, this loaded page gives access to CHROME, which is the reason that I want to disable JS for the first time .. ugh

javascript - shift-reload in FF gives unexpected results -

I change the img.src and Tags are currently expected to work only in Firefox (FF 3.5.3, Mac OS X 10.5.5), so cross-browser compatibility is not a problem (however). When the page loads for the first time, or loaded in a new window or tab, all work as expected, and cache behavior does not seem to be a problem on simple reload; However, if I try to force it to reload from shift-reload, I get a problem. Although the images are pre-loaded, preloaded images for animation are not available for the browser, which then attempts to load every new img.src from the server. Am I seeing here in a browser bug, or is there some buggy in my code that I can not see? This is my first shot in implementing a JS class, so there can be a lot of things that I do not understand. Any insights gathered here will be welcomed intelligently. You can see what I'm talking about: thanks When you reload, you are asking to reload the browser - not the cache. So it should not be surprised

algorithm - Filtering out text content on some criteria, e.g. about myself -

What is the specialist area where I have a set of blog posts for example, and I would like to filter those people who Can some criteria be about me or irrelevant? I know that I can have a list of words (which will be a lot for me, nothing / any other - combination will not end), for my filtering, but this is not a scalable strategy. Algorithms will also come in handy but I think this is a complete research area? Thanks This can be useful:

Python TCP stack implementation -

Is there a Python library that enforces a standalone TCP stack? I can not use the normal Dragon Socket Library because I'm getting a stream of packets on the socket (I'm being tunnelled on this socket). When I receive a TCP SYN packet addressed to a specific port, I want to accept the connection (a sync-send one) and then get data sent by the other end (appropriately ack'ing). I was hoping that some types of TCP stacks were already written which I could use. any idea? I have used lwip in the past for C project - anything in the dragon would be correct with those lines. You do not say which platform you are working on, but if you are on Linux If I'm working, then I'll return an IP packet as a real network interface to the kernel so that the kernel can do all that TCP stuff. How does this (for example) works - it receives raw IP packets on UDP or TCP and brings them back to the kernel on the tune / null interface. I think there is a tune / tap interfa

java - JAXB to unmarshall <string>foobar</string> -

Greetings! I'm returning a server to my client who looks like this: & lt; String xmlns = "..." & gt; Foobar & lt; / String & gt; I'm new to JACAB and a lot of things are working out. I thought it would be very easy for the Marshall and would be unrelated to the string and for this. It took a while, but I finally figured out how to do it martial public static string toxml (strings) throws an exception (Jxbctx reference = JxBCTX.New instance (string class) ; Marshaller Marshaller = Ref. Cretemriter SW; new stringwriter (); Marshaller.marshal (new JAXBElement (new QN ("", "string"), string class, S), SG; return sw.toString ();} So my question is, how did I provoke it? It can not be annotated as a root element. I want to create a new example of JAXBContext Can not use java.lang in the form (I get an ObjectFactory missing exception). Is anyone giving the knowledge? It can not be so difficult, right? You must write

c++ - How do you rotate a sprite around its center by caclulating a new x and y position? -

I am using dark GDK and C ++ to create a simple 2d game. I am moving an object, but it revolves around the top left corner of the phantom. I have the following variables available: PLAYER X PLAYER Y PLAYHEAD Rotateangle (360> x> 0) Is there an algorithm that will modify the axis point of the phantom, is better for the center? Here is a small code sample: void player :: move (zero) {If (checkLeft ()) {PlayerX - = PlayerSpeed; If (player x <0) playerx = 0; } If (checkwrite ()) {PlayerX + = PlayerSpeed; If (playerx> 800 - playerwidth) playerx = 800 - playerwidth; } If (checkup ()) {PlayerY - = PlayerSpeed; If (player Y & lt; 0) Player Y = 0; } If (checkdown ()) {PlayerY + = PlayerSpeed; If (Player Y> 600 - PlayerHeight) Player Y = 600 - PlayerHeight; } RotateAngle + = 5; If (rotate angle> 360) rotate angle - = 360; DbRotateSprite (Handle, RotateAngle); DBSpritata (1, PlayerX, Player Y, Handle); } edit I am thinking of opening some repu

First order array difference in Ruby -

What is the hottest, most popular way to do this? should produce [1, 3, 10, 5] .diff [2, 7 , -5] That is, an array of first order difference I have come up with a solution that I will add below, but it requires 1.9 and it's not all clever. And what is possible? Yet another way ... looks so far at least :) < Pre> module enfamous def deff self [1 ..- 1]. Zip (self) .map {| X | X [0] -X [1]} End End

c# - How an AJAX application informs client the events fired in server? -

How does the AXX application written in an ASXNET AXX show the client removed the event in the server? I meant that some applications like Gmail have come up with a new email, then Gmail tells the customer how much I am interested in how the update panel is used in ASP.NET AJAX. I know that UpdatePanel has a trigger property, but it does not control the events of my own classes only. Ajax applications constantly check server state to achieve this effect, they always appear in the form of clients Work in and can not receive requests from the server.

Django: Making model with undefined number of fields -

I am trying to create a model for paragraph site. I want to link each article with 3-5 related articles, so I'm thinking about the code being made like this: class.model : # Small url url = Model CharField (max_length = 30, unique = true) is_published = models.BooleanField () author = models.CharField (max_length = 150) title = models.CharField (max_length = 200) short_description = models.TextField ( Max_length = 600) body = tinymce_models .HTMLField () related1 = models.ForeignKey (Article) Related 2 = models.ForeignKey (Article) Related 3 = Model. ForeignKey (Article) But sure no that Or it is possible to make a foreign key, for example, in relation to the same model, if I decide to force 6, 7 articles for example, how will this work, related to me 4, 5, 6. ... to write in the model? I have more general solutions, so if I am binding more articles, then I do not need to redefine the code again and again What I am thinking, from related areas The paragraph model is not

SOAP service in Django with soaplib -

Hello I am looking to create a SOAP service within my Django app, but some hits have come up. First of all, I have been able to successfully follow the SoapLipi Hello World tutorial (Google "Soap Lib Hello World" because I can only use 1 hyperlink because this is my first question) using a CheryPy WSGI server to run the service , And initiate a SOAP request to the Soap Libin Client. I am having trouble converting a service into a service through Django. I am currently using the DejaGuo Development Server. Viewing the page with a Django error in the browser or creating a SOAP request using http: // localhost: 8000 / hello_world / or Soap Lib Client: Tried the hello_world_service in module foo.views. The error was: 'hello_world_service' is not a special property of 'module' object Obviously urls.py is matching exactly, But linked to that Django Snippet I, Hello_world_service should not be visible. I think that I am missing in the last pha

ruby on rails - Save in ActiveRecord -

When working with a model, when do you need to explicitly save? In a setter, def name = (n) self.name = n end should I save myself? For your specific example, you will need to do something like this: Class MyClass & lt; ActiveRecord :: Base DF name = (n) save self.name = n! End of End I would like to save! Instead of saving, you do not plan to check the errors until you save! Will throw an exception, but the savings will fail silently. BTW, I am guessing your example, is just an unrealistic fact, because you are overriding the existing activecord setter function for the "Name" field. The ActiveRecord Accessor method is quite different compared to simple Ruby Accessories, so if you create "name =" on the top of the automatically generated "name =" method, you get spoiled.

Alternative to qTip (jQuery Tooltip Plugin) -

Can a qTip suggest a good alternative to the jQuery tooltip plugin? I think this is slowing down my web app because instead it has put the canvas elements and event listeners all around. .

condition - Assembly language je jump function -

I'm trying to find the assembly language function "j" online. I have read that J is jumping to the right and that is what I want. Please tell me. P> BTW, I am using NASM if it makes any difference. Assume that you want to check ex is equal to 5 < / Code>, and perform different actions based on the outcome of that comparison. In each other words, a statement. ; ... some code ... CMP EX, 5J.IF_tra; If the comparison is false, then the code is run to run. Jmp Short .end_if .if_true:; Code to run if the comparison is true then it goes here. .end if: ; ... some code ...

algorithm - Binary Searching -

Therefore, I want to understand more about binary search, because I really can not understand. Binary search requires a pre-condition that has an array sorted. I got this right It seems that a method should check this pre-condition and throw an exception if it is not completed. But, why is a bad idea to check the prepaid? This is a bad idea because the data is being sorted, it takes n Step About the full search is the log (n) step. If you are going to check, you can also do linear search.

c# - How can I put files in the user's local application data folder in a setup project? -

I am working with a Visual Studio 2008 - if you want to include it, then use several special folders Access the files inside I do not see in the list is a user's local data data folder. Do any files have to be inserted into the file from within the VS 2008 Setup project? When I was the challenge, I made it: A class library assistant project has been created. The system was added. Config.install.exe reference. A new class processed from the system was added. Configuration. Install To copy the files written to the override of the installed method In the setup project, the above project output Targeted in the Applications folder and - Opted Assistant Project Output in Custom Actions (Install Group) application folder.

objective c - Error With Foundation.h -

I am learning objectives in Linux (Ubuntu), but when I tried to compile my application, whose I need the Foundation headers to say there is an error in saying that the file was not found, but I have installed the GNUstep Development Package (gnustep-devel). Here is my code: // fashion .h #import & lt; Foundation / NSObject H & gt; @Intefase fracture: nsobject {int fraction; Int begua; } - (zero) print; - (zero) setNumerator: (int) n; - (zero) SetignMinator: (Int) D; - (void fraction; - (zero) downhill; @end And there is the console log: ubuntu @ eeepc: ~ $ gcc main.m -o frac -lobjc file included in main .m : 3: Fraction.h: 2: 26: Error: objc / NSObject.h: No such file or directory is included in the main file: 3: Fraction.h: 4: Error: 'NOSBJX' for interface, Fracture Ubuntu @ APP Superclass: ~ $ What do I have to do? > -0.19.2- setup.exe Then download gnostep-core-0.19.2-setup.exe Remember one thing if you Any version you are down

excel - Spreadsheet: Count Repeated Values In A Column -

I am not particularly knowledgeable about spreadsheet wrangling, so I can use some assurance with a simple problem I am I have a column of year worth which I am sorting. I want to find quantity per year (read: number of duplication of value each year). I want to chart the values ​​I said I am not sure how this happens, It seems that I should be able to do something, but I am probably wrong. I am using Apple's number '08, but if possible, a common solution that many people can use. > Thanks in advance! You should use the countif () function: I counted it How many hours do I work for every upcoming version of my iPhone app? I was doing (), but you just want countif (). See the N4-N6 cell here:

c++ - constexpr and endianness -

One common question from time to time in the world of C ++ programming is interval compilation time scheduling. Usually it is made with hard portable #ifdefs. But does the C ++ 11 constexpr keyword get better solution with the template specialization? Will there be a legal C ++ 11 to do something like this: constexpr bool little_endian () {static unsigned number = 0xAABBCCDD; Return reinterpret_cast & lt; Constance unsigned char * & gt; (And number) [0] == 0xDD; } and then a template specialist for both endian types: template & lt; Bool LittleEndian & gt; Struct Foo {// .... expertise for a little endian}; Template & lt; & Gt; Foo & lt; False & gt; {// .... expertise for the big endian}; And then: Foo < Little_endian () & gt; :: do_something (); Believing that the word is included, your example is bad (notice That there is no concept of "legal / illegal" in C ++). The proposed text for [Decl.constexpr] / 3 sa

TSQL Query Pivoting -

I have a table structure as follows: Holiday Int Course IDID Int Cross INT Distance INT Low Index INT HighIndex INT Sequence INT (representing the sequence of holes: 1, 2, 3, ... 18) This course has 18 holes . I want to pivot in: Hole, 1, 2, 3, ... 18 cross, x, x, x, ... x distance, Y, Y, Y, ... Y LowIndex, Z, Z, Z, ... Z high index, A, A, A, ... A I curs it Can I use it but in any better way? TSQL stands for axis. For example, look and see.

asp.net mvc - add dynamic controls and get its values using jquery -

Let me add dynamic controls and get its values ​​in applications using our asp.net mvc (c #) jquery the wanted. When I click on the button, I need to add specific dynamic controls, enter the value and pass the values ​​after using jquery and clicking on submit button. Ex: To: Create events in Google Calendar, we can add many options to the reminder Itemprop = "text"> You can add dynamic controls specified in it but just make sure to add these input elements within "form" (if you are planning to create an AJAX You do not need to do so "post" though). And, if you want to add multiple values ​​in a single "form submit", then make sure you follow the conventions specified in this blog post => .

orm - Strongly typed .net -> sql data access? -

I know what I want, but is not sure about the name and the necessary equipment, so here goes. .. I have some different SQL tables. I need a tool that generates objects in my .net project for each table, in each column a property of this object. (I.e. strongly typed, no data) I want to be able to select, insert, update, and delete methods in my .NET project and possibly add the item (i.e. 'Person')) method which it is inserted into the SQL table. I'm not sure whether this data is an access layer, and an object-relational mapping or SQL to linux, or both wart. Any advice appreciated. From LINQ to SQL, and many other ORMs what all you need is that I believe in all That's even if you want to go to ORM Root. Personally, I'm OK with LINQ alone with SQL, I am generating my organizations using LINQ from SQL Classes Designer. I like to use the IQueryable extension methods on LINQ syntax, but this is more of a personal choice. However, to insert and delete

.net - What is the difference between a RoutedCommand and a RoutedUICommand? -

I have tried to read something about it, but I have failed to find documents which are called Routad Commands and Routines The UI communicates and conveys satisfactorily. RoutedUICommand derived from Route Commands and adds a text field to provide a description of the command. This is useful when the command is bound to access from the UI. I've got it.

OLPC development choices -

What are my options for developing a piece of software for the OLPC project? By looking at various sites and wiki, I honestly I can say that I'm still totally confused. Is this a sugar, C ++, Smalltalk or python? Thanks! First of all, brief answer: you want to use Python, And you want to make your dragon program "sugar-free" There is no Chinese programming language or development toolkit. This is a GUI environment and "activity" framework, children who use on OLPC laptops are called "activities", and Sugars provides a bunch of tools for their use so that they can increase their information to enhanced object databases (user perspective To "Journal"). Etc. in the list of available activities To make sugars applications, you write them in Python, use pygtk and / or pygames API for graphical work and other Chinese services (like Chinese API for storage), to cameras Access, mike, very cool networking accessories etc). You use a Chine

c# - Inheritance and Overriding Methods/Properties -

If I have two squares, which gets from the other and I use the same method / property name in both Public class MyBase: {Public Ink GetNumber () {Return 1; }} Public Sector MyDerived: MyBase {Public New Inc GetNumber () {Return 20; }} Myvard Avver = new Mirdiwide (); Int derivedVar = someVar.GetNumber (); // 20 mibbase baseware = (mybase) somewhere; Int baseVar = baseVar.GetNumber (); // 1 My tendency would be to use override instead of new for derived class, but I get "no member found to override". "post-text" itemprop = "text"> You must mark override before virtual Is required. > Public Square MySubses {Public Virtual Ink GetNumber () {Return 1; }} Public class MyDerived: MyBase {public override int Gatenumber () {returns 20; }}

python - django Unicode GET Parameter Values -

I'm trying to get a GET parameter value that looks like this: In Q Parameter This case is Hebrew I am trying to read the value using the following code: request.GET.get ("q", none) I find gybrish instead of the correct text Any idea which is wrong here? Do I have some settings? The query string is in ISO-885 9-8, but Django's default encoding is UTF-8 In order to obtain Unicode data, you must either change the ISO-8859-8.

delphi - When and Why Should I Use TStringBuilder? -

I changed my program from Delphi 4 to Delphi 200 9 a year ago, primarily to jump to Unicode, But to achieve this, all the benefits of Delphi reforms all those years. My code, of course, is all legacy code, it uses small strings, which now all long unicode string is formed, and I have changed all the old ANSI functions into new counterparts. But with the Delphi 2009, they introduced the TStringbuilder class, possibly the StringBuilder class .NET. My program handles many manipulation and manipulation, and can work to load megabytes of large membranes once megabyte to work together. I do not know much about the implementation of Delphi's TStringBuilder, but I have heard that some of its operations are faster than using the default string operation. My question is whether I have the ability to try it or not and use the TStringbuilder class to convert my standard string Thank you for your reply and I have to reach my conclusion, which is not bothered, unless the need for

linux - How to parse /proc/pid/cmdline -

I'm trying to divide the CMDline of a process on Linux but it seems that I do not trust it Could '\ 0' characters Do you know why sometimes the '\ 0' character is used as a separator and sometimes it is a regular place? Do you know the executable name and other ways to achieve its path? I am trying to get this information with 'ps' but it always gives the full command line and the executable name is cut. Thank you. use string $ cat / Proc / self / cmdline | String -1 cat / proc / self / cmdline

java swing app with a custom titlebar? -

Is there a way to write a Java swing application with custom Chrome? Please take Microsoft * on the frame for Zune 4.0 software. I know that the colors, the shape of the scroll bars, etc. are controlled by the holes or looks and I think I am now trying to deal with the native window which makes java components - main As the title bar. ( (*) by default The frame of a JFrame is original. This can be removed by calling . Sun window does not provide the PL and F title bar. You can hack a JInternalFrame so that it can pull the frame, though maybe it may not be as easy as it is, of course, if you are going through a full custom route, then whatever you want Can attract. From 6u10, Sun's JRE also provides an API to make windows transparent and non-rectangular.

php - Update to php5.3 breaks connecting to mysql db -

I am currently updating PHP to 5.3 and can no longer connect to my remote messaging server. I get the following errors: mysqli_connect (): Ok packet 6 bytes less than expected mysqli_connect (): (HY000 / 2000): mysql can not connect with MySQL 4.1 using the old authentication It seems like it has to do with the new MySqlnd driver. Is there a way to apply it to the old libmysql driver? Apart from this, by returning to php5.2.11, it does not seem that the problem working for most people has not been corrected. Well I recorded a long time cold response, but someone better than me already Answered it. TLDR; With this response, your php for your application has been re-compiled. Ionut G. Warning: mysql_connect () [function.mysql-connect]: OK packet less than 6 bytes. {Filename} Warning on line 18: mysql_connect () [function.mysql -connect]: Using old authentication from mysqlnd, MySQL 4.1+, on line 18 in {filename}, It all says you can not use old authentication with m

c# - SHA1 hash different in Vista and XP -

In a WinForm application using C # .NET 2.0 (on Vista), I am using SHA1 hash to create a hash with a string and store hash in a text file (with UTF-8 encoding) I want to use the hash stored in a text file in a condition. When I run the project in Vista, it works properly (i.e. the condition results are true), but when I run on XP the project does not start. Is the hash created from XP differently in Vista? Remove the code byte [] hash value; Byte [] MessageBoights = Encoding. UTF8.GetBytes (strPlain); SHA1 Managed SHhash = New SHA1 Managed (); Stringbuilder strokes = new stringbilder (""); Hashvalu = Shush Compact hash (messageback); Foreign (hash value in byte b) {strHex.AppendFormat ("{0: x2}", b); } // UTF-8 encoding test condition string newHash = Program.GetHash ("This hash will be done."); // GetHash () has the same code as above but instead of having a hash in the file // hash bool valid hash = new hash instead. Ecloss (oldhash); //

c# - Code Expressions in ASP.NET Themes -

Binding expression (eg & lt;% #%>) is only allowed in ASP.NET skins very limited. It appears that only eval ("") statements are accepted with the textual argument any formatting Work or mixed expression is not allowed. Two part questions: How does one support the text = ' & lt;% # Eval (MyEnum.FirstName)%> < How one supports text = '& lt;% # Eval (MyEnum.FirstName) + Eval (MyEnum.LastName)%> 'Inside a skin Will this work? & lt;% = MyEnum.FirstName% & gt; Edit: Hang, it will only work if you are doing raw HTML output, are you trying to get it? EDIT: Why not add any property to your minima class that inserts for you? Something like this: public string full name {get {return FirstName + '' + LastName; }} Then your binding expression can be: & lt;% # Eval (MyEnum.FullName)%>

asp.net - Cancel control postback -

Is there any way to cancel the antitext pending postback upon completing some condition on code without using javascript ?? You have a true contradiction on your own: Cancel Current text message and When this condition is behind the code , then You can not go back until you have a postback ps What is the problem using javascript? Give more details on your scenario, and you can get some help.

Why don't I see pipe operators in most high-level languages? -

Unix shell is an extremely powerful tool in programming. With a small set of core utilities, a system language (such as C) and scripting language (such as Python) can create very compact and powerful shell scripts, which are automatically parallel to the operating system. Obviously this is a very powerful programming paradigm, but I have not seen the pipe as a first class separation in any language other than a shell script. To repeat the functionality of the script using Pipes, the code necessary is always necessary. So my question is that I have some modern high level languages ​​like Unix pipes like C #, Java, etc.? Are there languages ​​(except Shell Script) that support the first class pipe? Is not it a convenient and secure way to express concurrent algorithms? When someone brings it, I look at the F # pipe-forward operator (forward pipe operator), and this function looks like the application operator. It states that, as far as I can tell, one function is applied in the

flash - what tools are there to decompile swfs to flex -

How do you know that a swf was written using Flash or Flex? And is there any way to compile the Flex back? I know that it's sophisticated for flash, but there is something for Flex? Both Sothink SWF Decompiler and Eltima FlashDecompiler both support Flex decompilation. I have used Sothik's solution several times in security audit and have adapted the byte code and when the result got worse, you can expect any flash decompile out. Exporting Flex provides a flex project that can not be re-compiled without having to manually edit its files, although most of the original projects are relatively close to the source (hidden variable names, Multi level convertible assignments etc.) and nothing that you are familiar with source code, if you can not fix what I think you are, Are given not much else. It is being said that, for those people who are unaware of the flash security issues or are interested in protecting their property, in the HP, Jagadal has recently launched Fla

Can Silverlight do everything Flash can? -

I do not know much about multimedia development and in terms of capacity to compare Silverlight and Flash in some trouble Is falling. In other words, is there anything that can be completed in flash which can not be completed in Silverlight (and vice versa)? I am talking more about graphical ability, layout, etc. For example, can you develop the game in Flash with some flash-only functionality that can not be developed using Silverlight? Of course, you can do anything in Flex, you can also do it in flash. My knowledge of Silverlight is limited, but there is nothing that you can create in flash that you can not make in silver light and vice versa. The main difference is that the C # which provides things that the AS3 does not have for example generics, operator overloading and threading (not sure that threading is included with the silver framework , And there is psoidothreading for flash in it but this is not an inbuilt thing). This is being said I think that you will be

Challenge: C# Foreach - Before, After, Even, Odd, Last, First -

Since C # is not the first, the latter, the last, the first, as part of its foreach. Allow: first, first, even, weird, last, after events This is a challenge # 1 do not execute / execute the primary function (the function executed on all objects of the archive) during the events listed in If you can exceed the above criteria, please! > I will post my answer below, but it is not elegant nor is it possible, so I want to see what the community can cover. Hard coded for the loops sometimes gets bothered = ( LINQ ... After: .poipoyel (meaning) (left as obscure as your meaning) First: .) (Exclamation of your meaning is unclear) Last: . () First: . First () Strange: . Where ((x, i) => i% 2 == 1) even: . Where ((x, i) => I% 2 == 0)

jenkins - ant - not recognized as an internal -

I have installed ant (apache-ant-1.7.0). But when I run the ant command in the DOS command prompt, it says that 'ants' is not recognized as internal or external commands, operative programs or batch files. Where am I going wrong. This means it is not on the path. Edit your path environment variable to include the "bin" directory of the anti. The exact step to edit your path, depending on your operating system, but for example on XP: Bring Explorer (Windows-E) "My Select "Computer" and "Properties" On the "Advanced" tab, click on "Environment Variables" If the set of "user variables" is already a PATH entry , Then edit that. Otherwise, create a new entry (if you want it to affect all users, then set it as a system environment variable.) At the bin directory without any quotation marks Add a semi-colon to separate it from another entry. For example, you might have: c: \ Program Files

Jquery jcart Maximum quantity of one for a specific item -

Is there a way to limit a specific store item, so that it can be added to the jersey once? You can do this easily with simple logic compared to the built-in functionality of the plugin by > The pseudo-code will be as follows: If you try to add an item to the cart: If the item already exists in the cart and there is a property in the item ( Only 'one time')): return false; Else: Add to Cart The volume range of car items does not seem to be a built-in option.

visual studio 2008 - Getting a Fatal Error C1083 when converting a project from vc 6.0 to vs2008 -

I am having the following error while converting a project from vc6.0 to vs2008 Error The code is Error 1 Fatal error C1083: Can not open the source file: 'FpDebug / BalanceGrabber.pch': Any such file or directory c1xx Where BalanceGrabber is my project .pc is a previously compiled header: production of STdAfx.cpp, essentially. A simple clean / reconstruction should fix it, otherwise try to clean out the output folders manually.

performance - Hibernate Unable to Start On Large-Scale Database -

I am using Hibernate + HSQLDB on my desktop, which is to develop a database adapter for my application. . For reasons of heritage, the ID is prepared by the app as a wire. All were working fine. Now, we have a pre-data database, which has more than one lakh records. To be in hibernation, some changes (such as identifiers were too long) on ​​the side, but nothing was big. That is, till I can not find this problem. When I try to start my application on a preproduction server, then hibernation begins to be a gazaville query that ultimately ends in an out-of-face error: Java heap space. Maximizing the heap is not helping I have disabled the C3PO cache settings and disabled hibernate HBM 2W. Otto. I do not know why this question is doing, and I do not know how to disable them. Can someone help me ?????? To bring you curiously, in hibernation, said. So when you load the first object, hibernate starts to bring all related objects too. You have to set all unnecessary connect

Detecting browser client area size on wide screen using javascript -

I am using the following code to find out the breadth of the browser client area for ages and with it all the browsers Although different versions of 100% FF, Safari and IE, now when I switch to a new monitor with Widescreen resolution (1280x800), this code fails on IE8. This clientwid reports 1024! !!! Any ideas how to get the correct client width of the field? function getClientWidth () {var v = 0, d = document, w = window; If ((!! D Kapomod || D Kapmed == 'CSS 1 Compact') & amp;; woopera & amp; amp; amp; d.documentElement & amp; amp; and · d.documentElement ClientWidth] {V = d.documentElement.ClientWidth;} and if (D.and.D.body.clientWidth) {v = d.body.clientWidth;} and if (xDef (w.innerWidth, w.innerHyight, d) .height)) {v = w.innerWidth; if (D. Height> w.innerHeight) V- = 16;} Return V;} function detectBrowserSize () {var myWidth = 0, myHeight = 0; if (type window.innerWidth == 'number') {// non-IE myWidth = window.innerWidth; MyHeight

mocking - Going From State Verification to Behavioral Verification using MOQ -

I am trying to embrace TDD and I am starting to learn about joke. I need some advice on what I should do to test and how to make my classes more behaviors and simple data containers (with a group of gates / sets). Consider this category. public class posts {list & lt; Comment & gt; Comments {get} Private Set;} Public Zero Addcomment (String Message) {Comment.Add (New Comment (Message)); }} An example of a state verification test will be [test] Public Zero CanAddCommentToPost () {post p = new post (); P.AddComment ("AAAAA"); Assurance Requel (1, comments. Count); } I ', of course, is not what I should do for verification of behavior, can someone provide some samples using Moq? You have to renew your post class, but do not worry. Public class posts {Private ILST & lt; Comment & gt; _notes; Public Post (IILIT & lt; comment & gt; CommentContainer) {_comments = commentContainer; } Public Zero AddComment (string message) {_comme

vb6 - Getting Error on while reading a blank text file? -

Use of VB6 When I am reading an empty text file, the file's input is in the form of the past Showing error in Code code fileSystemObject Dim TS as TextStream Dim TempS string set as the final form string set fso = new FileSystemObject set TS = Fso.OpenTextFile (txtSourceDatabaseFile & amp; \ "and filename, for reading) final = ts.read ts. Atndoffstream temps = ts.redline final = last & amp; temps & vbcrlf loop ts.close How to check if the text file is empty or not? If there is no need to read the blank content, then You are doing this : final = TS reads up to all T. At AndOffStream Templates = T.S. Redline Ultimate = Last & TempS & VbCrLf Loop Before calling ReadAll, you should check at and endream, something like this: If the TS interfstream then final = "" otherwise the final = ts.redl ts.at and offstream tempos = tA Kredlain final = final and amp; TempS & amp; VbCrLf loop and if However as a note, you get a

asp.net - regular expression ^[A-Za-z ]+$ -

^ [AZA-Z] + $ This expression is working but it is not accepting a location, I want to accept a place like 'data base' ^ [AZA-Z] + $ is not taking place in this expression like 'database' like I need 'data base', like help me thanks. / P> should be & lt; Asp: RegularExpressionValidator ID = "RegularExpressionValidator1" ControlToValidate = "Textbox1" ValidationExpression = "^ [A-Za-z] + $" runat = "Server" Error Message = "Regular Express Wallet" & gt; & Lt; / Asp: RegularExpressionValidator & gt; ^ [AZA-Z] + $ As you will see in the expression, there is space after a small z, and it will allow space

apache - OpenCart .htaccess 301 redirect -

I enter www in the domain .htaccess content: # options + follow-up symlink IfModule mod_rewrite.c & gt; Start the #OPENCART revival on the reinsurance engine. Rewind Conduit% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -D Rivieraithm ^ (. *) Index.php #OPENCART Revives and Rewinding On Retreatbase / RewriteCand% {HTTP_HOST}! ^ Www.mysite.com.com [NC] Rev.Aril. ^ (. *) $ Http: // www \ .mysite \ .com / $ 1 [R = 301, L] & lt; / IfModule & gt; Note that 302 redirects are working me It seems that all you want to do is do this within your Apache configuration file. Rev. Revoke on% {HTTP_HOST} ^ mysite \ .comRewriteRule ^ (. *) $ Http: //www.mysite .com / $ 1 [R = 301, L] >

code generation - How to write a Makefile rule to download a file only if it is missing? -

I am trying to write a makefile which should be downloaded to some source, if and only if they are missing. Something like this: Hello: Hello. Hello GCC-O Hello. Hello.c: wget -O hello.c http://example.org/hello.c but for this reason, hello.c The bar is run to run the command. I would like to do this to download only Hello C to be downloaded by the makefile. Is it possible to create a GNU and how to do it? My guess is that wget does not update the timestamp on Hello.c, but retains the remote timestamp is. This causes the build to assume hello.c is outdated and tries to download it again. hello.c: wget ... touch $ @ edit: wget to download wget to -n option remotes anything by wget The file will stop (but it will still check the timestamp of the remote file.)

c# - PDF Binary Display on Page -

I have a binary store in a SQL Server table, I have PDF files in it (in binary), what do I want Does a "DIV" display a PDF on a webpage? I do not want the user to open an open so that it opens in Acrobat Reader. I need a small thumbnail that they click and opens a model window with the PDF document displayed as a picture. Does anyone know how to get it or if there is any component available to do this? In the browser, the PDF will send you & lt; Object & gt; or & lt; Embed & gt; will be required to use the html tag. You can point to the use of a PDF file URL to display. If you are not able to link PDFs to a browser somewhere else in a binary store, you will need to create a page (or http-handler) to obtain binary data file content, so it's a URL Can be linked through the medium. Take a look at serving the file using "Response.Binarywrite".

jquery - How to achieve this title generation from this website -

I have been presented with the title of a page to the user of this website with Jackie, try to achieve something like I am doing this, ie: When you click on a thumbnail from the main index, the title of that thumbnail prepares different values ​​as long as the user Does not appear properly. Just wondering if it can be achieved anyhow using jQuery, though it is using Adobe Flash? Thank you. This is a way without jQuery I'm sure this correction can be done, but I hope that It helps and offers you this idea how to do it. & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Function createRandomString (length, id, callback, value) {if (value of type == "undefined") {value = ""; } If (value.length == length) {callback (value); Return; } Var c = ((Math. (Math. Random) * 100))% 127); If (c == '\' '|| c ==' \ "') {c = 33;} value + = String.fromCharCode (Math.max (33,

jquery - How to limit the size of an HTML textarea with JavaScript? -

Is there a code to limit characters in any one text field and display the character count? I need something like Twitter Status Input and I can not find anything online if there is nothing, then I will probably talk to a jQuery plugin or at least open source. Thank you! Take a look at this page: & lt; Script language = "javascript" & gt; Function border (text, border, infodiv) {var text = $ ('#' + textid) .val (); Var TextLanguage = Text Long; If (Text Lang & gt; range) {$ ('#' + infodiv) .html ('You can not type more' + limit + 'characters!); $ ('#' + Textid) .val (text.substr (0, border)); return false; } And {$ ('#' + Infographic) .html ('You have' + (Segment - TextLabel) + 'characters remaining.'); Return true; }} & Lt; / Script & gt; Then tie the function in your texture key up event. To do this in the event of this kind of JQuery: $ (function () {$ ('# comment'

java - Should I go 3D for my game? If so, how far and any good tutorials? -

I have been working on Java simulation games for some time (remaking theme hospitals in my own way) now Until, I have done everything in 2D using intersections and circles. How do I do 3D in Java, but have seen some tutorials, got coke and code, but I am sure if I have to use this then I have to use it. My idea was either 3D simple, as is in flat 3D or real 3D, which would be a lot of work, more difficult. I really wanted to hear the general thoughts of people when I went to 3D. Here is a video of my progress a few months ago (). 2D graphics are rather uncomfortable I want to make some more progress, although I do not know that I should develop in 2D, if I want to finally go to 3D. Besides, I do not know how hard 3D would be. Ideally, I want 3D to be rotationally complete. I know that this is relatively ambitious, but I will be systematized for the circles and sections instead of the blocked people and the objects thanks < Div> class = "post-text" item

Nested Function in Python -

What can we gain with the Python code in this way: Class some_class ( I'm doing this with an open-in-source project, doing some useful work inside the nested function, but doing nothing except calling it (actual code Can be found.) Why can anyone put this code like this? To write code inside the nested function rather than the external, normal function, Whether there is a profit or side effect? ​​ Generally you make it Def make_adder (x): def add (y): return x + y return add plus5 = make_adder (5) print (plus 5 (12)) # prints 17 < / Code> You can use the variable from the closing function (in this case, the local variable x ). If you are not reaching any variable from the attached frequency, They are actually doing just simple tasks with a different radius.

iphone - Converting audio and video to NSData -

I want to confirm suggested methods for converting audio and video files into NSData objects. What + DATAWIT CONTENTS OFFICIAL: Is this the best way to do it? There is only one item for the video URL, yes DAVIDITY CONFIGNS file probably the most Good way

how to use a supplied username and password to read a file in Java -

I need to read a bunch of binary files from Java Script running Windows. However, the folder in which files have limited permissions (ie my Windows username) is allowed to read them, but the user who runs Java (this is part of a web application) does not . If I pass my own username and Windows network password at runtime in Java, then what is the one way that I can read those files using my own permissions instead of a web user? (Note that this web; This is a one time imported script that is running in the context of a web application.) You can create a network share and then import can connect via java.io.IOException; Import java.net.MalformedURLException; Import java.net.UnknownHostException; Import jcifs.smb.SmbException; Import jcifs.smb.SmbFileInputStream; Example of public squares {public static zero main (string [] args} {SmbFileInputStream fis = null; {Fis = new SmbFileInputStream ("smb: // DOMAIN; USERNAME: PASSWORD@SERVER/SHARE/filename.txt"); // han

Javascript refresh page -

I have a html page with a button pop-up if I click on this button on a new window pop-up , Then I do all my changes in this window and then click on the close button. After closing the pop-up window, the html page with the popup button should be refreshed. Is this possible? Yes. // reload openers. .. window.opener.location.reload (); // Close self ... window.close ();

c# - encapsulate AppSettings in a class? -

मेरे पास कोड है: var mySetting = ConfigurationManager.AppSettings ["mySetting"] ; क्या ऐसी कोई जगह बनाने का कोई तरीका है जो प्रत्येक सेटिंग को समझाता है, इसलिए मुझे "mySetting" जैसी स्ट्रिंग कुंजी का उपयोग करने की आवश्यकता नहीं है? मुझे पता है कि आप "कस्टम कॉन्फिगरेशन अनुभाग" बनाकर ऐसा कर सकते हैं, लेकिन मैं किसी अन्य अनुभाग को नहीं बनाना चाहता ... मैं मौजूदा & lt; ऐप सेटिंग्स & gt; अनुभाग। एक और विकल्प एक अलग इंटरफ़ेस बनाया जाएगा जिसका उपयोग आप अनुप्रयोग सेटिंग्स को पुनः प्राप्त करने के लिए कर सकते हैं सार्वजनिक इंटरफ़ेस IFooSettings {int MySettings {get;}} सार्वजनिक वर्ग ApplicationSettings: IFooSettings {सार्वजनिक स्ट्रिंग MySettings {get; निजी सेट;} अनुप्रयोग सेटिंग्स () {MySettings = ConfigurationManager.AppSettings ["mySetting"]; }} यह शक्ति होगी यदि किसी कारण से आप अपने कॉन्फ़िगरेशन को डेटाबेस में सहेजना चाहते हैं, तो आपको केवल एक चीज की आवश्यकता होगी IFooSettings से एक वर्ग का उपयोग करने के लिए I डेटाबेस सा

Converting varchar to decimal in sql server 2008 -

I have this data varchar '00072330' looks like '723.30' in SQL Server 2008, in decimal how do I get it Change? Try it: declare @ data as varchar (8) set @dta = '00072330' print cast (decimal as @data) / 100

php - Validating a video upload in the Symfony Admin Generator -

When using the admin generator to upload a video, my form is working quite oddly. If the file is too large, which means it is larger than the PHP upload limit, the form displays the first error in the edit.yml file, or no error. My administrator generator defines the video in the following way video_filename: help: video should be .flv or .mp4 Files up to 32 MB can be uploaded. Type: admin_input_file_tag upload_dir: Video parameter: include_remove = true include_text = video I have tried to add sfFileValidator to no avail. items [video_filename]: SfFileValidator: max_size: 512000 max_size_error: max size is 512Kb Does the admin generator detect PHP error and allow user more Can a useful error? You can change the error_reporting setting in config.yml on your app / It can help

xml - How do I run an XSLT file? -

OK it sounds like a stupid question but I can not understand it I am writing an XSLT file to translate an XML document into the XHTML document, I have used both Visual Studio and to preview the results of my XSLT file, but now I want to actually write a real XHTML file so that I can see how it looks in other browsers. Neither is there a clear way to preview Visual Studio or XML Notepad. Am I forgetting something Obviously the file is being created because something is being previewed, but I need to know where the file is being created or it is better to choose its location. In Visual Studio, add an XML file to a project. Open the XML file when the file is open and its window is activated, you should see in the property window, that you can specify output filenames and stylesheets. In addition, you should see that the menu bar now includes an "XML" item If you select "Show XSLT Output" from the "XML" menu, then VS Apply specified conversion to

How can I implement Web Services in Perl? -

पर्ल में वेब सेवाओं को कैसे कार्यान्वित करें? मुझे पसंद है मैं मानता हूं कि मैं एक भारी SOAP उपयोगकर्ता नहीं हूं, लेकिन मैंने आईआरसी पर भारी SOAP उपयोगकर्ताओं से सुना है कि एक्सएमएल :: संकलन :: सोप एक सपना है, उनके लिए सच है। दूसरे दिन, मैं था एक SOAP- सुलभ डेटाबेस से डेटा को निकालने के लिए एक छोटी लिपि लिखना मैंने एक्सएमएल :: संकलन :: सोप की कोशिश की, और पूरे डेटा निष्कर्षण समारोह में पांच लाइनें समाप्त हो गईं! डब्ल्यूएसडीएल को लोड करने के लिए एक पंक्ति, फ़ंक्शन को संकलित करने के लिए एक पंक्ति, जिसे मैं कॉल करना चाहता था, उस फ़ंक्शन को कॉल करने के लिए एक पंक्ति (पर्ल तर्क को स्वतः WSDL विनिर्देश के विरुद्ध सत्यापित किया गया था, और मूल प्रर्वर्त संरचना से दूसरे पर अजीब जावा संरचनाओं में परिवर्तित किया गया था अंत), और परिणाम को थोड़ी मात्रा में मज़बूत करने के लिए एक पंक्ति। लोगों को शिकायत करने के बाद कि कितना मुश्किल साबुन है, मैं खुश नहीं हो सका। जेएमएचओ।

How to use Terminal Services EasyPrint from a Server 2003 client -

I am trying to I have noticed that there is an RDP 6.1 client for XP client I could not find it to install on the server 2003 box. I was able to install the RDP 6.0 client for Server 2003. However, it seems that EasyPrint is not really working in this case because we are seeing that the printer without local drivers is not being redirected to the remote desktop. Information on the web is disputed to some extent. Are we trying possible? if yes. Any suggestions on how to work from a client on a server 2003 workstation? This will be for you :-) Kim

c# - How do I get a DataMemberAttribute use a boolean type -

I have a simple test app that lets XML doctors pull from a comfortable interface. There are some string fields and some boolean fields in the data element. I create a simple unit class and put a DataContractAttribute on it and then added DataMemberAttributes to each data member. I then use HttpResponseMessage.Content.ReadAsDataContract () to analyze the response. All string types come through just fine but all my Boolean types are false (and they are not really wrong) The XML element is something like this: & lt; Has-enabled type = "boolean" & gt; True & lt; / Is-enabled & gt; And then in my type class I have something like this: [datamember (name = "is-enabled")] Public Child is enabled { Get back to it } Set {this.isEnabledField = value; }} How do I get the boolean values ​​properly? Whether or not to believe it, the data controller is sensitive to the sequence of elements of XRML, which can be deserialized Used to be. I am su

custom ASP.NET web form vs InfoPath -

I have been assigned a project to create a paper based process on a web based basis only. What I need to do is allow the user to fill an online form and sign his / her using the mouse. Data entered and signature should be obtained later in the form of a PDF file. Therefore, I have created a working prototype using ASP.NET webforms and a third party PDF library (iTextSharp), as well as a mouse signature capture device that I bought. The prototype works fine but my concern is that I may need to support this application several (maybe hundreds) of forms, each form has different fields, but all of them A signature is required. I took 2 days to create a prototype for a form, create web forms, mark fields in PDF templates, hook web form fields with fields in PDF form, etc ... In the future I do not want to spend every form 2 days to set, is there a better way to make ASP.net's custom image? I know about the information, but it has never been used, did anybody do anything before

language agnostic - Access control lists -

I've been on roll-base access control lists for an upcoming project and I'm having some problems That's how it will work for me. I have seen that in the examples, they always talk about allowing and denying the specific functions of a controller / model. For example: group "visitor" can read post, "member", read and edit , and "admin" Create, read, update, delete near . These things seem a bit global for me. In my own situation (adjusting for this example) , there will be a large number of groups, each of which only Edit which can post a certain category (or some other criteria). The only way I can think of it working for me is to create a new AOC for each category: posts_cat: 1 < / Code> and then give them all access individually (which may be the royal piston for administrators who should reach everyone) How does the ACL pattern like this Do situations cover? What are the better ways? I will eventually impl

python - Subclass lookup -

(I'm developing in Python 3.1, so if there's some shiny new 3.x feature, I know about it I have got a class (we call it a "packet") which acts as a parent, which is a few dozen packet types from some classes. Represent a legacy client-server protocol on which I have no control. (Packets are often wildly different behaviors, so I gave them their class to make their life easier.) When obtaining a packet, I have a simple "dispatch" function Checks the packet headers to determine the type, then close the hands of the class that know how to deal with it. I want to keep no lookup table with hand - it is uncomfortable and just asking for trouble, instead, I sorted by checking all the sub-sections of the packet I want to create a table on time, which will be the square variable which specifies which packet type they match, such as: class login (packet): Type_id = 0x01 I thought, absolutely, object .__ subclasses (__ () walk through Regardless of th

Rails Validation | add class to surrounding <div> -

itemprop = "text"> Railway questions are for default behavior fields for error verification, such as error-style divisions around input fields, such as < / P> & lt; Div class = "type-text" id = "pre_negotiation_value_div" & gt; & Lt; Label = "contract_budget_holder" & gt; Budget Holder & lt; / Label & gt; & Lt; Div class = "fieldWithErrors" & gt; & Lt; Input id = "contract_budget_holder" name = "contract [budget_holder]" size = "30" type = "article" value = "" /> & Lt; / Div & gt; & Lt; / Div & gt; I'm trying to complete, to enclose the label and input field with the classified div tags, so that they look like the following: & Lt; Div class = "type-text fieldwhetherers" id = "pre_negotiation_value_div" & gt; & Lt; Label = "contract_budget_holder" & gt; Budget Ho

How to convert an ADP project under source control from Access 2000 to Access 2003? -

We have an ADP project that was created using Access 2000 several years ago. This project uses source control (Access Standard MSSCCI based add-in that integrates access with SourceSafe) We now use Access 2003 to work with this project. Everything is working fine, which includes integration with source control. However, when this ADP file has been opened from Access 2003, it says that the project has the "Access 2000" format. There are good reasons to change this ADP project from the "Access 2000" format to "Access 2002-2003" format, the question is: How OK can I make such a conversion without losing "source control" (especially, without losing all source change history)? After some research on more than one information source, I found the following solution: Open the ADP file (such as MyProject.adp ) in general, in MS Access. See everything . To access the ADP file in the "Access 2002-2003" format, go t