Posts

Showing posts from February, 2013

c# - How to validate string can be convert to specific type? -

I have a string that can be int, date time, boolean, byte, etc. How do I validate that the string can be converted into those types without using TryParse of each type? public class generics manager {public static change chang type gt;)) {value = (T) Convert.changetap (data, Nullable.GetUnderlyingType (typeof t))); } And {if (data! = Null) {value = (t) convert.change type (data, typef (t)); } } return value; }} is not useful at large here, but I think you can use it, and can validate that the result is not equal to the default for that type . However, Tryparse is much better and you're trying to do.

wpf - How can I define and use a variable in XAML to define a color? -

I have a number of elements in the XAML that defines Foreground = "# 555" Color of fade text in a readable text box for & Lt; Text boxes Text = "{Binding SingularModelClassFileName}" HorizontalAlignment = "left" IsReadOnly = "True" foreground = "# 555" width = "500" / & gt; & Lt; Textbox VerticalScrollBarVisibility = "visible" AcceptsReturn = "true" width = "500" height = "100" IsReadOnly = "True" foreground = "# 555" Text = "{SingularModelClassContent Binding}" HorizontalAlignment = "left" margin = "0 20" /> How can I assume I can put in a XAML variable and I can refer to each attribute so I'll have to change it in one place? I'm thinking you can do something like this : & lt; Sys: string x: main = "ReadOnlyTextColor" & gt; # 555 & lt; / Sys: string & gt; ... & lt;

java - Secure XML Parsers -

In typical Java applications, XML Parsers are XALAN / XERCES but they were not written with the security in order to find out I'm curious about whether there is a stronger parser in terms of security. What do you mean by 'brain in security'? Would you consider a secure xml parser? In this there is a great deal about XML threats. You can give some hints and concepts. Edit: To answer your question: Hardware solutions that can analyze the communication and filters for virus attachments in your incoming HTTP, SOAP, etc. Dangerous XML with soap, deliberately large / infinite unit recursive etc.

latex - Parts in pdflatex Table of Contents -

I have a thesis in which I want to use some lessons together \ part command. What do I have to do: Chapter 1 Part I Chapter 2 Chapter 4 > Then the last chapter should be at the same level again. In the Table of Contents, you can not actually detect it, because the parts are at the same level anyway. The problem is that in PDF, Chapter 6 is added under Part II. Does anyone know any way to change it? This package can do quite well with other things. This PDF uses the embedded PDF bookmark only one pass. \ part {...} \ chapters {...} \ bookmarksetup {startatroot} \ chapters {...}

url rewriting - How to redirect a request to a non existant PHP file to a existing DIR in a clean way? -

About my client asked me to create a web app in PHP, I ended up using Symphony. On distribution, he told me that he has pointed out a software to the hardcod URL with an embedded web view: www.domain.com/dir/tools.php Now she wants to show the web app in the web view, but the software is used by about 400 consumers, we can not expect to change the hard coded URL. How do you feel that I can clear it by: Create www.domain.com/dir/tools.php and use redirection? Which one else? Use the URL rewrite? Any snippet is appreciated, I have no idea to do this. Apache: RewriteRule ^ dir / tools \ .php $ new_page.php [R = 301] Edit: As stated, it goes into your .htaccess file. I have more information in the linked mod_rewrite document. Fixed.

java - Why should wait() always be called inside a loop -

I have read that we should always call a wait () from within a loop: while (! Condition) {obj.wait (); } It works well without a loop, why is it so? You not only need a loop but check your position in the loop. Java does not guarantee that your thread will only be informed by informing () / informing () the call or the correct information () / notify (). Due to this property loop-less version can work on your development environment and may fail unexpectedly in the production environment. For example, you are waiting for something: synchronize (TheObjectYouAreWaitingOn) {while (! Carrien) {theObjectYouAreWaitingOn.wait (); }} Comes with a bad thread and: theObjectYouAreWaitingOn.notifyAll (); If the bad thread can not mess with carryOn then you are waiting for the right client. Edit: Add some more samples. Waiting can be interrupted, it throws a blocked exposure, and you may have to try to wait-based depending on the needs of your business, you can le

asp.net - Control.ClientID with CSS -

Can CSS be used with control that generates client IDs and not regular IDs? Now I can use the CSS class, but I want to know whether it is possible to use the ID: # DIVERSION ID #Label Control ID {Padding: 100px; Red color; } There is no good way to do this. Many developers use something like this: & lt; Style & gt; # & Lt;% = MyControl.ClientID% & gt; {Padding: 100px; } & Lt; / Style & gt; But obviously I'm not a big fan of it. It is very tagsy and fragile, starting with ASP.NET 4.0, you will be able to control the client ID of an element in the code, so that you can specify the ID for the elements that you know you will be using CSS or JS With the goal will be required. In the meantime, I recommend using classes that the system I work on, we require classes and restrictions ID for client-side code (CSS or JS) because it Additional overhead is not worth it. Classes can work as well as ID - nothing is preventing you from having some uni

file size upload limitation in ASP.NET MVC: more than 1 maxRequestLength setting in web.config(s) -

I want to set more than 1 for maxRequestLength - file size upload limit (for example a file / new, other Pictures / for New) & lt; HttpRuntime executionTimeout = "60" MaxRequestLength = "1024" /> I run the root web. Tried to keep 2 settings with 2 space sections in config, but without any success. I'm not sure what to write in "path" - physical aspx page of a scene, or controller + action ... However, nothing is working. & lt; Location path = "/ file /" & gt; & Lt; System.web & gt; & Lt; HttpRuntime executionTimeout = "60" maxRequestLength = "4096" /> & Lt; /system.web> & Lt; / Location & gt; & Lt; Location Path = "/ Picture /" & gt; & Lt; System.web & gt; & Lt; HttpRuntime executionTimeout = "60" maxRequestLength = "1024" /> & Lt; /system.web> & Lt; / Location & gt; I have another web in

c# - Can Sandcastle be configured to produce SEO friendly pages and links? -

By default, I think that it is generating links with the name of HTML pages and GUIDs. Can it be changed to create a user / SEO friendly name for pages in any way? To wit. Instead of making it 'namespace.class.method.htm' for f987d4ff-cabc-10af-86cd-620978605d86.htm , such as it has been generated. < Div class = "text-post" itemprop = "text" & lt; NamingMethod & gt; MemberName & lt; / NamingMethod & gt; Not sure that this is exactly fit according to your needs, but this is an option of the GUID.

VB6 IDE is changing the case of my enumeration names -

I need to maintain some VB 6 applications, and when I speak the names of enumeration would do me a weird problem the way it is supposed to Intellisense in VB6 if my variable name, say, is defined dim Abraxis as a string, and when coding I typed Abraxis, it changes to IDE Abraxis On the fly as I leave the word. However, I have found that if I set up a calculation like this, for example: public Enum tiErrorEnum tiNone = 0 tiWarning tiError tiDupDoc End Enum I was determined by using a ErrorNum = tinone cover expect IDE enums,> in a statement such as Is there a solution? Yes, there is. It looks weird, and you probably want to note that you do not have it the future of the gods, so why are your code skeptical about it, but here you want to do. Add enumeration as a public item inside a compiler's directive code block (so the compiler can not see it definitely). This is how you should preferably do this under declaration accurately count ,: public Enum tiError

How can I make mousewheel work in VB6 IDE? -

An annoying behavior of the VB6 IDE editor, especially when returning from recent devices such as VSNET, is that This moussahel Do not recognize! It may be that VB6 was brought out when most of the rats did not have one, but is there a way to determine whether the musculosk can be identified? Microsoft has an extension that can provide the requested behavior. You have to download it from the link below and register it with the given steps, such as regsvr32

jquery - Superfish problem, "Object does not support this property or method" -

I'm getting the "The object does not support this property or method" error on the following line ... $ ("ul.sf-menu"). Superfish ({Path Class: 'Current-Subsy'}); My understanding is that superfish.js should have defined that method. It is embarrassing to ask for help because it is actually likely to be dumb, but maybe my I am unable to handle it due to ignorance. explained this. I imported jQuery twice: & lt; Script src = "./js/jquery-1.3.2.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "../js/superfish.js" type = "text / javascript" & gt; & Lt; / Script & gt; ... & lt ;! - did not pay attention to this one - & gt; & Lt; Script src = "../ js / jquery-1.3.2.min.js" type = "text / javascript" & gt; & Lt; / Script & gt;

wxpython - wx.Panel scales to fit entire parent Frame despite giving it a size -

I'm a newbie for Wxpython. I am trying to create a frame and there is a small panel area inside that I am blue. However, no one matters what I do. Using panil-shaped properties, the single panel pulls the size of its original frame. If I add another panel (Pen 2 in the code below) both the pens are drawn in the right size. I know that I can control these panels using Sears. But I was trying to understand why the wx.Panel behaves the way the object behaves all alone. Here is the code: import wx class plateau (wx.frame): def __init __ (auto, * args, ** kwds ): Self.frame = wx.frame .__ init __ (auto, * args, ** kwds) print "made frame" if __name__ == "__main__": an_app = wx.PySimpleApp () aframe = PlateGui (original = any No, id = -1, title = "test frame", size = (300, 300)) pane = wx.panel (parent = aframe, size = (100,100), style = wx.RAISED_BORDER) Set-Background Caller (wx.Colour (0,0,255)) # Pence 2 = wx.Panel (Original = Ephraim, Size = (2

In Delphi IDE, how to quickly determine the location of an open non-project-related file? -

This is probably a question in which there is an easy / simple answer, but I have asked myself many times, And never able to answer it: When I Ctrl-click on a class name, Delphi loads the unit that defines it (it's on the browse path). Once opened in the IDE, is there a way to find out how that PAS file is folded-on to a hard drive? In Delphi 2009 you can hover over the tab at the top of the code.

iis - Moving from one https page to another with a different certificate -

Imagine a bog standard signup page, which captures some user information such as name, address, etc. This, which is transferred to a payment site (WorldPay). Now, it is necessary that everything is safe, so that it means (and correct me if I am wrong) a) I get an SSL certificate on IIS and Have to install. B) I must then save the signup page (how to do it perfectly, but if someone wants to tell me that this is grand!) So, assuming that the signup page is now under a certificate There is no reason why there should be a problem in redirecting the World Pack (which is under SSL but is under a separate certificate)? I can not imagine why I am not doing this on AJX or some other (see), but sometimes these things can cut you off! Thanks Duncan The only problem is that I can see that if If you have a direct form with your users, then the most alert page (FF 3.5 shows "incredible connections" in a similar scenario - it is to stop phishing attacks). One possible sol

database - why FK constraint does not work in MySql -

itemprop = "text"> I have created two tables with the following constraints and ORDERITEMS: Changes the table OrderItems Obstacle FK_Reference_30 Include Foreign Key (Order ID) references order (order ID) on removing restrictions on update restrictions; If I want to delete an entry in the ORDERS table and that order ID is in the ORDERITEMS table, I should get an error or warning, I think. But I did not really get anything, I put two lines in ORDERS and some lines in ORRERITEMS. When I tried to remove all the rows in the commands, then I did it. no complaint. I am using MySQL databases with Toad for MySQL. I think you are using MyISAM tables. / P> If you run " run table order " you will see that it failed to record foreign key definition. The MyISAM table does not support the foreign key, it parses MySQL syntax, but then when you use MySam, it removes it quietly. If you use Inodb tables for both order and order, then it will work better. Y

.net - Unity Newbie Question -

I am trying to use unity for the first time and I think that I can chew more than I can . We have an N-level application in which there is a base library with many abstract types and after that many business scenarios are at the top / concrete type of specific libraries. For the East: There are two implementations in the abstract type of lead, within a Motor Vehicle Finance Lead base library in another Automotive Fines library, NewAtomotilide in a neutogy library, we have a set of adapters that argue on a base type like lead Are there. I am trying to use unity for the first time to return an interface ILeadDuplication, when I put the resolution on ILIDDPPP and either a string value named "new automotive" or "automotive finance" Nautilus, NewAutominal Lead Duplication or Automotive Finance Lead Duplication Example (name mapped on container after typing register) such as: IUnityContainer Container = New Uniti Kantner ()) container. Registrar type elevator; ILDub

bash - echo printing variables on single line -

मेरे पास दो चर हैं: निर्यात पोर्ट संख्या = 8888 ^ एम निर्यात लॉगिन LOISE = 10.1 172.2 ^ एम मैं उन दोनों को एक बृहदान्त्र ':' द्वारा अलग किए गए एक पंक्ति पर प्रिंट करने का प्रयास कर रहा हूं। इसे "10.1.172.2:8888" जैसा दिखना चाहिए echo -n 'लॉगिन आईपी:' echo -n $ loginIP_BASE echo -n ':' echo $ portNumber लेकिन इसके बजाय यह इसे प्रिंट करता है: : 8888 आईपी: 10.1.172.2 ऐसा क्यों है? मैं इसे जो करना चाहता हूं, मैं इसे कैसे प्राप्त कर सकता हूं? इसके अलावा, वेरिएबल्स दूसरी फ़ाइल से पहले से मौजूद हैं, इसलिए मैंने उन्हें खुद नहीं लिखा है "^ एम" क्या करता है? फ़ाइल को विंडोज से द्विआधारी मोड में स्थानांतरित कर दिया गया है, और अभी भी लाइनों के छोर पर कैरिएज़ रिटर्न वर्ण होते हैं। ये आपका ^ M प्रतीक हैं, और वे पाठ स्थिति को लाइन की शुरुआत में वापस करने के लिए पैदा कर रहे हैं मान प्रदर्शित किए जाते हैं - पहली मान के अंत में कैरिएस रिटर्न लाइन के शुरू होने पर दूसरा मान प्रदर्शित करता है, पहले मूल्य के हिस्से को ओवरराइट करता ह

tfs - Merging from wrong changeset in some circumstances -

I have a main branch and a god branch in TFS. I changed from main branch to god branch. Now when I try to merge again, I say that there is nothing to merge. However, when I merge with the Div branch from the main branch, it magically determines that a bunch of files are different (which only exists in the main branch). Why does this decision? Because TFS is dividing the dev branch by using the wrong changelist version! It is using the second one from the last changeover, as I have never asked! Sure I can solve this by merging a force, but then mainly every file will be changed when it actually changes. 'T. What do I want that TFS works logically in order to actually work, does anyone have a work-around address for this behavior? Although this question has long been asked before. First of all, you are working on God branch and you have a branch like a published branch, so when you merge you will get all the changes checked on the Dev branch to the main should do. If

javascript - How to call functions that are nested inside a JQuery Plugin? -

My goal is to be able to call those functions that are inside my JQuery plugin What is the correct syntax? For example, this does not work: & lt; A href = "#" id = "click_me" & gt; Click me & lt; / A & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; (Function ($) {$ .fn.foo = function} {do_stuff = function () {console.log ("Hello world!"); // works do_other_stuff = function (warnings ("Who are you? ");}} // function} // function}) (jQuery); $ ("Body") foo () .; $ ("# Click_me") Click (function () {$ .fn.foo.do_stuff.do_other_stuff (); // does not work}}; When you assign tasks without the var key, they overwrite local variables that are added to that name or global namespace. Do_stuff is a global function, which you do not want) One way to do what you want to do is to clear

c# - Building an "inner stroke" effect from a Polygon -

I am portraying a whole bunch on a canvas, most of which share shafts with at least one other polygon I want to point out that by setting a polygon "special", the stroke on a polygon is partially pulled by another polygon due to the overlapping edges, which helps to reduce stroke from place to place is. In addition, on the basis of draw order, around a polygon it can be almost completely covered with a stroke. Extraction of polygon is not a very attractive option, because the visible difference between polygon is much less than this "thin stroke" problem. I believe that the effect I see can be achieved by generating it as a pair of polygon instead of each polygon, such that a polygon is completely contained within the other And the stroke of this small polygon (not multilayer) runs to the stroke of the outer polygon, the inner polygon is filled with a transparent all the time, and a non-transparent stroke occurs when I point it out Ahta that pair now polygons

authentication - Invalid parameter exception on client.auth_getSession() in Facebook java API -

I want to connect with your Facebook app using Facebook Java API 2.1.1 (). My application is in "Desktop" mode so I should be able to reach it out of the web application. I have not defined any callback URL for my code looks like this: FacebookJsonRestClient client = new FacebookJsonRestClient (FB_APP_API_KEY, FB_APP_SECRET). String token = client.auth_createToken (); Http client http = new HTTP client (); Http.SsetParams (new HTTP client) (); Http .setState (new HTTPSTATE); Last string login = "https://login.facebook.com/login.php"; Get GetMethod = new GetMethod (LOGIN + + FB_APP_API_KEY + "api_key =?" "& Amp; V = 1.0 & amp; auth_token =" + tokens); Http.executeMethod (found); Postmap post = new postmount; Post.addParameter (new name ValuePair ("api_key", FB_APP_API_KEY)); Post.addParameter (new name ValuePair ("v", "1.0")); Post.addParameter (new name ValuePair ("auth_token", token)); Post.

What case to use when comparing strings in Microsoft programming languages? -

Note: This is a question, I'm asking more than historical interest, as I I know When comparing two strings of an unknown matter, I am remembering that in Microsoft-based conversion methods where optimized for uppercase rather than lowercase. Therefore: if (string A.Tupper () == stringB.ToUpper ()) {...} will be faster than this: if (stringA.ToLower () == stringB.ToLower ()) {...} If this is true, then what is this store Better to do when you want to find it, then string data is upper than the lower case? We can do something in .NET like this: If (String.Compressor (String A, Stringb, String Communications, Inventory Culture Ignore Case) == 0) {...} and change the wire in upper or lower case There is no need to worry about it more.

sql - Concatenate column values from rows -

I SQL Server I am using a Taimset usable system with 2000 backend I more than 1 so many rooms and tutors in different forms by changing the different rows different can turn into different lists I have used the code below in this code: DECLARE @ tartar varchar (8000) SELECT @ Tutors = isnull (@Tutors + '+', '') + name fROM (SELECT CT_EVENT_STAFF .event_id, CT_EVENT_STAFF.weeks, CT_STAFF.unique_name, celcat200809.dbo.CT_EVENT_STAFF AS CT_EVENT_STAFF left oUT of CT_STAFF.name ER Select 200809.dbo.//STAFF AS CT_STAFF at CT_EVENT_STAFF.staff_id = CT_STAFF.staff_id WHERE event_id = @eventID) data_set print @ tutors Event_ID is a unique event, it only works when when will I know the exact ID, I think it's a way of doing this for each individual event_id without can not what the cursor goes to every ID? Its possible solution to use a UDF is my second problem, the timetalling system (CEKKAT) creates a new database for each year (I do not know), then I would have

How can I include the output of a Perl script into a PHP page? -

We have been asked to support some older Perl forms on a new site, because we have a PHP based CMS The script needs to be included in our new CMS. I have tried a little shell_exec, but it is disabled. Has anyone got any ideas? perl extension A Perl extension is available This allows you to: Load and execute pearl files Instant of Pearl objects Pearl objects $ Cvs -d: pserver: cvs.php.net:/repository co pecl / perl run a Perl script An example is listed here: Example 1 (test1.pl) print "Hello!" Example 1 (test1.php) & lt ;? Php print "Hello from PHP!"; $ Perl = new Pearl (); $ Perl- & gt; Required ("test1.pl"); Print "Bye!"; ? & Gt;

objective c - Is overriding a synthesize property in Objectice-C Ok or bad? -

I have overridden a synthesized property because I wanted to add an NSAssert. Is it OK (ie override) or bad behavior? @ modify some fields; - (NSString *) Some fields {NSAssert (someField! = Zero, @ "some fields"); Make some comeback; } thanks It is alright: You use the @Synitish keyword to tell the compiler, which should synthesize Setter and / or Gestator methods for the property if you do not provide them within @Efmentation Block. / P> So if you provide them, the compiler will use you, even if @ synthesis directive.

mysql - Deleting duplicate rows from a table -

I have a table in my database that has duplicate records that I want to delete. I do not want to create a new table with specific entries for it. What I need is to remove duplicate entries from the existing table without any new table formation. Is there any way to do this? id action L1_name L1_data L2_name L2_data L3_name L3_data L4_name L4_data L5_name L5_data L6_name L6_data L7_name L7_data L8_name L8_data L9_name L9_data L10_name L10_data L11_name L11_data L12_name L12_data L13_name L13_data L14_name L14_data L15_name is L15_data All of these are my fields: ID is unique to every line. The L11_data is unique to the corresponding action field. L11_data is going to be the name of the company while action industries have been named. So in my data, I keep duplicate names for companies in my L1_data for their respective industries. What do I want that companies should have unique names and other data in a specialized industry stored in action. I hope I have explained my

c# - Can log4net count how many error traces have been logged? -

For some hardware C # regression test simulations we are using log-in to find out the execution of the simulation Are there. Mistakes happen every time something goes wrong, and there should be zero errors, of course. We use the error number to set / fail the test, we currently search for the ERROR log to determine it. Is it possible to get error count from log-ins, which logs an error every time? I see that it is possible to log errors in a separate file, but this is not what we want, although with some negligible we can extract information indirectly on it. Thanks in advance. To import / database> log files into the database, I will log on to a database directly or create a regular / p> Once logs are in a database table, they can be easily asked with SQL.

wpf - Open File Dialog MVVM -

Ok I really want to know how expert MVVM developers handle an open file in WPF. I do not really want to do this in my ViewModel (where 'Browse' is referred to through a representative) Browse Zero (the Ultimate Object) {/ code here Add OpenFileDialog d = New OpenFileDialog (); If (D. Shodiolog () == true) {// do stuff}} Because I believe that the MVVM is against the system. What do I do? The best thing to do here is to use a service. A service is just one category that you use from central stores of services, often an IOC container assuming that you have IFileDialogService , you can do this ... Browse zero (the object is param) {var fileDialogService = container.Resolve & lt; IFileDialogService & gt; (); String path = fileDialogService.OpenFileDialog (); If (! String.IsNullOrEmpty (path)) {// Do stuff}}

c++builder - Automating RegisterClass in C++ Builder VCL -

We use a C ++ builder for an application whose form is placed externally for the EXE in the database The application code is C ++ This allows us to modify the form and form / verb without compiling it again. Here's the snippet of code that gets the job of loading a form. RegisterClass (__class (Tibetan)); RegisterClass (__ ClassID); RegisterClass (__ ClassID (TRadioGroup)); RegisterClass (__ ClassID (TGroupBox)); RegisterClass (__ ClassID (TCheckBox)); RegisterClass (__ ClassID (TRadioButton)); RegisterClass (__ ClassID (TTimer)); RegisterClass (__ ClassID (TListBox)); RegisterClass (__ ClassID (TComboBox)); RegisterClass (__ ClassID (TBitBtn)); RegisterClass (__ ClassID (TSpeedButton)); RegisterClass (__ ClassID (TMaskEdit)); RegisterClass (__ ClassID (TProgressBar)); MS = New TMemoryStream; MS2 = New TMemoryStream; // Load modules in memory stream MS- & gt; Condition = 0; Ms- & gt; LoadFromFile (filename-> Text); MS- & gt; Condition = 0; PModule = new TFor

Creating a custom array within an array sort function in Javascript -

In order to sort arrays to the custom sort function, I have to enter in the SortIP function. This does not work from the last digit of the number. function ccupi (A, B) {back [0] [3] - B [0] [3]; } "Network switch", ["ADSL router", [192, 168, 0, 1]], ["Gary Mack", [192, 168, 0, 15]], [192, 168, 0, 2]], ["production email", [192, 168, 0, 60]]); LAN.sort (SortIP); Network Switch: 192.168.0.2 Gary Mack: 192.168.0.15 Product Email: 192.168.0.60 you are almost there just replaced back [0] [3] - b [0] [3]; with back [1] [3] - b [1] [3]; And you are Why? Because IP is the second (index = 1) cell of each array.

javascript - Is my jQuery syntax wrong here? -

I'm learning jQuery and I think this code is not working: < Code> & lt; Script type = "text / javascript" & gt; $ (Document) .ready (/ * Navigtion Stuff * / function () {$ ('. Menu ul'). Hover (function () {$ (this) .Parent (.) AddClass ("active");}, AddClass ("active") ("$") ("$"). );}); & Lt; / Script & gt; The first thing that does it is considered. Is not my function bad, is my syntax bad? If not, I thought my code is conflicting with some other javascript on the page. Thanks in advance! There is some confusion with your bracket $ (document) .ready (/ * Navigtion Stuff * / function () {$ ('. ("Active");}, function () {$ (this) .Parent (). RemoveClass ("active");}); $ ( "Menu"). Parent ("li"). AddClass ("active");}); Better.

java parse html + css and convert the output to different lang -

I need to understand HTML + CSS files and convert it into some things like RTF layout in Java now I understand I have been parsing html but what do I have to do there? How do I implement html-css converter? Is there some type of pattern or method for this type of job? I do the following: Applying XSLT to convert to an RTF using an XML library Note: Although I did not find an XSL file for that conversion, but I'm sure there is one

In C, how do I restrict the scope of a global variable to the file in which it's declared? -

I'm new to C I have a book that tells C's "File Scope", which includes sample code. But the code simply declares and initiates the scanned file - it does not verify the scope of the variable, trying to access it illegally. Hence! In the spirit of science, I created an experiment file bar.c :. Fixed four fileScopedVariable [] = "asdf"; File foo.c : #include & lt; Stdio.h & gt; #include "bar.c" main () {printf ("% s \ n", fileScopedVariable); } According to my book, and Google should call printf () - but it is not. Outputs foo.exe string "asdf" and ends normally. I would love to use file scoping, what am I missing? You have #included bar.c, where the preprocessor should actually compile the contents of cc before the compiler touches it Make a copy. Try to get rid of it, but ask your compiler to compile both files (like gcc foo.c bar. ) and seeing it Complain. EDIT: I think the rules of lan

iphone - NSException thrown loading a XIB file with a UITextView -

I have a XIB file with a UITextView, which I'm associating with a UITextView * outlet in my controller : @ Introlfa MyController: UIViewController & lt; UITextViewDelegate & gt; {IBOutlet UITextView * textView; } @ Property (Nonatomik, written) Aibiotlet Uaitikd Witch * Tekstwu; I have not implemented any way to follow the prototype in desperation, I representative. My view would tap on my main XIB file when I contextual tab bar button has been loaded with a defined tab bar, so is throwing an exception immediately (before any control methods). Call stack looks top (debugger) to like this: # 0 0x93829bc6 - [NSException increase] # 1 0x9157f8f8 in 2 0x9157f35e in _NSSetUsingKeyValueSetter # - [NSObject (NSKeyValueCoding) setValue: ForKey :] # 3 0x91603f81 - [NSObject (NSKeyValueCoding) setValue: forKeyPath:] # 4 0x30c1fadb - [UIRuntimeOutletConnection Connect] # 5 0x9381ebe5 - [NSArray makeObjectsPerformSelector:] # 6 0x30c1e629 - - [UINib instantiateWithOption

asp.net mvc - How do I display data in a Repeater using Entity Data Model and MVC -

I'm trying to follow this example:. When I try this, I get an error: View Data.model = _db.MovieSet.ToList (); In my intellisense, I have not received ToList () Here is the code: using System.Linq; Using System.Web.Mvc; Using MovieEntityApp.Models; Nomination Movie EntityApp.Controllers {[HandleError] Public Class Home Controller: Controller {FilmsBoots _DB; Public Home Controller () {_db = New movies DBETTA (); } Public Performance Index () {ViewData.Model = _db.MovieSet.ToList (); See Return (); }}} I am trying to display the results in the view of repeater, anyone will see that code as well as the code of the ASPX page. Repeater is designed for web forms and works with web form events. In MVC, you really want to avoid data-bound controls such as repeater, gridwew, listviewview. It is very easy to spit films in the loop, though: & Lt; TR & gt; & Lt; TD & gt; & Lt;% = Html.Encode (item.Title)% & gt; & Lt; / TD & gt; &

sql server - copying related data using CTE within one SP? -

I have to copy the data for a student (clone student) which includes three tables: < TblStudent Subjects (where PK is a student student and FK student is Idd) To complete this, call me Performing student records by competing with existing student records and getting new students Classes Create Record student subject to all current students about using new student student and create Students topic comments recorded using freshman student. Blockquote> ... hope you got it So, is it a great way to use CTE in a store process? (I am using SQL Server 2005) INSERT and UPDATE statements operate on only one table There are times. You need 3 tables that require INSERTs. You can of course insert several rows in the table in one line, and I think it is good to do it when possible, but you can not put rows in several tables together. Think in this way. When you are pulling records in a single result set from several sources, you do the query. When you modi

scripting - cron jobs to upload a file via FTP -

Is it possible to use CRONA to upload file via FTP? If yes, how can I call ftp for upload? A Unix-like operating system you can set up a cron job which is like a shell Point to script: #! / Bin / sh cd [source directory] ftp -n [destination host] & lt; & Lt; END user [user] put [password] [source file] end , depending on your FTP client default and source file type you specify binary You may need to put .

bitmap - Extract RGB values from a AVFrame (FFMPEG) in C++ -

I am currently trying to read in a video frame using FFMPEG. Format PIX_FMT_RGB24; For each frame, RGB values ​​are collected in all frames-> data [0] (where the frame type is AVFrame). How do I remove individual R, G and B values ​​for each frame? This video is for processing, I would think it would work in the same way as to remove RGB values ​​from bitmap too. Thanks! My guess: int p = x * 3 + y * Frame & gt; Linesize [0]; R = frame & gt; Data [0] [p]; G = frame & gt; Data [0] [p + 1]; B = frame & gt; Data [0] [p + 2]; I can have R, G and B behind and there are lots of rooms for speed.

perl - Calling clean up code in mod_perl environment -

Some bid to choose from practical mod_perl "Typically, a single process has many Completes the requests before it exits, so ED blocks can not be used, if at the end of the processing of each request, something is expected. " < P> Then, in my CCG script: My $ flag = 1; END {# $ is the price of the flag undefined, if this script is run under mod_perl # END block code only when the process is run to deal with CCI clearance. # I want to execute some code before the process of handling the CCI exhaust. If ($ flag) {# clean code How can I get $ C in CCI script? Can Substrate Use My Scope Flag Variable? Will this $ r-> register_cleanup be placed on a CCI script? I just want to execute the cleanup code for a cgi script. No rest my $ r = Apache-> Yes, but see the next few pages about scopes of local variables and functions. Yes, if you want to run it only register the function.

asp.net - How do I handle an apostrophe (') in MS SQL 2008 FTS? -

I have a website that uses MS SQL 2008 FTS (full text search). This search works fine if a user searches for a string like which is for a string - it returns any results with that is , If a user searches for thats , and searches for the database that , its results will not return. In addition, ideally and that , etc anybody should know that FTS supports this And what can I do to enable A parameter Use myCommand.Parameters.AddWithValue ("@ searchterm", txtSearch.Text.Trim ()); This will handle you without any hassle. In relation to that, it is more that you should search for keywords Updated This is a great thing about a TFS team member. It is cited: Daniel is correct Full Text Search (FTS) does not directly use SOUNDEX, but it can be used in conjunction with SOUNDEX < Br> In addition, you can access the following links as well as CONTAINS & amp; SOUNDEX You might want to see some strong sound algorithms as well as the

.htaccess - conditional rules htaccess -

वर्तमान में, मेरी .htaccess फ़ाइल को htis जैसा दिखता है: IndexIgnore * / * RewriteEngine पर पुनर्लेखन ^ एडी / एडीएपीपी आरईआरईआरटीआर्यूएल ^ एडी / $ एडीएपीपी आरईआरआरआईटीआरयूएल ^ सीटएमैप। एक्सएमएल / एक्सएमएलएसआईटीएमपी.एफ़पी रीराइटरेबल ^ ([^ /।) +) $ / इंडैक्स.एफ़पी? एसएलयूजी = 1 रीइरेट नियम ^ ([^ / \।] +) / $ / इंडैक्स.एफ़पी? एसलाग = $ 1 यह लिंक के लिए ठीक काम करता है: site.com/category/ हालांकि, मैं जैसे site.com/ के बाद पूर्ण स्लैग इसलिए कि मैं site.com/category1/subcategory2/subsubcategory3 आदि को रीडायरेक्ट कर सकता हूं। एक श्रेणी के अंदर उपश्रेणियों की एक अज्ञात राशि हो सकती है। मैंने request_uri के साथ कोशिश की, लेकिन यह वास्तव में काम नहीं कर रहा था। यह कैसे करें? धन्यवाद एक गुच्छा! संपादित करें: रीवरइटएन्गइन पर रीइरेटकॉन्ड% { REQUEST_FILENAME}! -d रिक्राइटकॉन्ड% {REQUEST_FILENAME}! -f पुनर्लेखनकॉन्ड% {REQUEST_FILENAME}! -l रिवेराइट। * Slug.php?% {QUERY_STRING} [एल] यह यूआरएल को पास करेगा To slug.php

php - How to process large amount of POST data from a textarea? -

I am developing a tool where copying and pasting data with many lines (> 1 MB data) Can be text field. When I submit the form it shows only a blank screen. nothing happen. Is there a way to process large data submitted by PHP with chunks and pieces? What are the best practices for handling large amounts of data in the beginning of the web? Thank you for you !! Firstly, you need to increase the default amount that you get from PHP 8MB, whatever It seems that you need it, you can handle it, the other thing is how to handle that amount of data, it depends on what you really want to do with it, you can clearly Malicious code will need to be cleaned.

How can I programatically determine the location that Flash stores Local Shared Objects -

I am writing some automated acceptability tests for Flash movies (running Moving using iMacros). I need to "reset" the test environment before running each test, setting the flash in local shared objects. I can do this manually by deleting these files: C: \ Documents and Settings {UserName} \ Application Data \ Macromedia \ Flash Player # Shared Object \ FQSTGCV7 \ {Site-url} Obviously I want to automate this extinction phase; But I am wondering how to determine the above path in a non-machine-specific manner. In Net, "C: \ Documents and Settings {User Name} \ Application Data \ Macromedia \ Flash Player # Shared Object \" is clearly Cobain (Environmental Gatefolterpath (Environmental specialfolder.exceptiondata, @ "Macromedia Flash Player \ # Lion Objects") How can I find out how "FQSTGCV7" will be on a different machine ? Is there an environment variable? Is there only 1 directory under the Sharst objects? thanks I&

Forcing HttpOnly cookies with JRun/ColdFusion -

We need to ensure that all cookies on the CF7 site have been set as HTTP. We are using jsessionid to control our sessions, and JRU does not make it as HTTP only. Although it is possible to modify the existing cookie to add this setting, we have to set it up to the beginning from http. Any suggestions? Related Questions: From: CF 8 or less is running and using application.cfc <lt; Cfcomponent & gt; & Lt; Cfset this.sessionmanagement = true & gt; & Lt; Cfset this.setclientcookies = false & gt; & Lt; Cffunction name = "onSessionStart" & gt; & Lt; Cfheader name = "set-cookie" value = "cfid = # session.cfm #; path = /; http only" & gt; & Lt; Cfheader name = "set-cookie" value = "CFTOKEN = # session. CTOKEN #; path = /; HTTP only '& gt; & lt; / cffunction & gt; & lt; cfcomponent & gt; </code> </pre> <p> Make sure you have setclientcookies

sharepoint - MOSS 2007: 3 additional assembly binding redirects, where are they coming from -

The web of my custom settings and a newly installed mous. A webcam with a working web server with config. Is configured I There are 3 redirects I source of I do not know: & lt; DependantAssembly & gt; & Lt; Assembly ID name = "Microsoft SharePoint.Port.Siligison" PublicKitocon = "71e9bce111e9429c" culture = "neutral" /> & Lt; Compulsive Redirect Old Version = "11.0.0.0" Newverson = "12.0.0.0" /> & Lt; / DependentAssembly & gt; & Lt; DependentAssembly & gt; & Lt; Assembly ID name = "Microsoft SharePoint.Port.Siligison.Security" PublicKitokon = "71e9bce111e9429c" culture = "neutral" /> & Lt; Compulsive Redirect Old Version = "11.0.0.0" Newverson = "12.0.0.0" /> & Lt; / DependentAssembly & gt; & Lt; DependentAssembly & gt; & Lt; Assembly name = "SPCanary_NET" publicKeyToken = "71e9bce111e9429c&qu

java - Swing: How could I get JInternalFrame treated equally to other components inside a container? -

पृष्ठभूमि जानकारी: मैं एक दृश्य आरेख संपादक को कार्यान्वित कर रहा हूं, जो विभिन्न जटिल तत्व (शीर्षक पट्टी, उप-तत्वों के साथ फिर से बड़ा हो) और विभिन्न सरल तत्व (फिर से बड़ा नहीं, कोई शीर्षक बार, नहीं सब तत्वों)। सभी तत्व ड्रैग करने योग्य हैं। मैं जेएनएनल (सामान्य तत्वों के लिए) के साथ तत्वों का प्रतिनिधित्व करने के लिए जेनेटअलफ्राम (जटिल तत्वों के लिए) का प्रयोग कर रहा हूं योजनाबद्ध आरेख। इस अवधारणा के साथ मेरे पास कई समस्याएं हैं: > केस 1 - कंटेनर एक JDesktopPane है। JInternalFrames अन्य तत्वों के ऊपर हमेशा से रहे हैं पर क्लिक करने से अन्य तत्वों डॉन ' टी "निष्क्रिय" पूर्व में सक्रिय JInternalFrame केस 2 - कंटेनर एक JLayeredPane है: एक JInternalFrame अंदर कुछ तत्वों क्लिक करने के बाद, यह हमेशा के "सक्रिय" रहता है केस 3 -। JInternalFrame हर चीज के लिए थे, लेकिन सजावट के बिना सरल के लिए तत्वों: मेरी कस्टम सीमा (जो तब आवश्यक है जब मैं मैन्युअल रूप से JInternalFrame की शीर्षक बार निकाल देता हूं) हर बार

actionscript 3 - AS3: in addEventListener external anonymous function is not running -

असल में मुझे यह कार्य है: निजी फ़ंक्शन clickURL (url: string): फ़ंक्शन {ट्रेस ("फ़ंक्शन को तत्काल दिया गया है"); रिटर्न फ़ंक्शन (इवेंट: माउसईवेंट): शून्य {ट्रेस ("फ़ंक्शन रन हो गया है"); ExternalNavigation.newBrowserWindow (यूआरएल); }} इस फ़ंक्शन का उद्देश्य एक यूआरएल लेना है, यूआरएल को किसी अन्य फ़ंक्शन में डाल देना और उस फ़ंक्शन को वापस करना है ताकि मैं बस टाइप कर सकता हूं: UrlButton.addEventListener (MouseEvent.CLICK, clickURL ("http://test.com")); फ़ंक्शन clickURL वापस ईवेंट पैरामीटर के साथ addEventListener फ़ंक्शन पर फ़ंक्शन वापस करेगा। इस तरह से मैं निर्दिष्ट करता हूँ कि यूआरएल क्या होगा जब आप बटन दबाएंगे। यह तब होता है जब आप इसका इस्तेमाल करते हैं, तब का उत्पादन होता है: // फ़ंक्शन को चालू कर दिया गया है इन्स्टालनल फ़ंक्शन कभी नहीं होता है जब आप बटन क्लिक करते हैं तो रन करें तो मैंने सोचा कि मैं किसी नकली घटना के साथ कोशिश करूँगा ताकि मुझे कुछ भी याद न पड़े। var clickTest: फ़ंक्शन = clickURL ("http://stackoverflow.com

c# - OnFocus TextBox change Gridview Header Font? -

Hey guys I have a Gridwu and 4 below text box I use to enter data for the purpose of Style I am able to highlight the entire line color on focus: Code> & lt; Script language = "javascript" & gt; Function Headerol (id) {document.getElementById (id) .style.color = 'yellow'; } & Lt; / Script & gt; & amp; protected void Gridwu L_arokreteted (object sender, Gridwuarwventawart Aarjis e) {if (e. Rau. RO type == data Kantrolrv type. Header) {String id = "row" + Ikro . Row Indexes Toasting (); E.RO.Attives Add ("id", "row" + e.ro. round index); DescrTxt.Attributes.Add ("Onfocus", "Headerol ('" + ID + "')"); }} I want to take this one step beyond this and only want to highlight some top columns based on that header which I focus on. Can someone talk to me some examples or a good dOM tutorial? I am very dreadful with Dome. Resolve; string id = "cell 0"

LDAP and PHP connection failure -

I am trying to connect to a secure LDAP server (using LDAP) via PHP, but me There is a problem with this. I get the following error WARNING: ldap_bind () [function.ldap-bind]: Unable to bind to server: at /var/www/test.php Not contacting LDAP server Line 16 I work while trying to connect without LDAP, but it is necessary that I use LDAP because I'm dealing with sensitive information. I'm using the following code with LDAP LDAP query exam "; Echo "connecting ..."; $ Ds = ldap_connect ("ldaps: // server"); // should be a valid LDAP server! Print $ ds; If ($ ds) {echo "br> binding ..."; $ R = ldap_bind ($ ds); // This is an "anonymous" tie, usually use only access to read // "the result of the bind is" $ R " "; Looking for echo "(sn = S *) ..."; // search nickname entry $ sr = ldap_search ($ ds, "ou = people, o = server.ca, o = server", "uid = user name *"); Echo &qu

ocaml - Doing a N-dimensional walk in pure functional ML? -

This idea is to be run on many dimensions, each one is defined as the limit ( funny foo yx or function such as > funny foo zyx can be applied to whole class X Y or Cube X Y * Z. SML / NJ 'like my implementation below: test2.sml: 7.5-22.6 Error: Closed right-to-function function type [circular] expression Do not agree: (Actual -> Z) -> Unit result type: 'Z -'> declaration in Y: move = (fn arg = & gt; (fn & lt; pat & gt; = & Gt; & lt; exp & gt;)) Here is the code: Fun Playing [] _ ​​= () | Walking (R: RS) f = val (k 0, k1, n) = r val delta = k1 - k = val phase = delta / real n funny loop 0 _ = () | loop i k = walk rs (f) k ); (* Note (FK) "Eats" the first argument I think that SML does not like the change in the middle of its definition * like the type of change) loop (I + 1) (K + phase) finally loop n k the end of the DO2D yx = (* ... *) () Fun do3D zyx = (* ... *) () Val x_axis = (0.0, 1.0, 10)

flash - Actionscript to open URL in new window open new window but not fullscreen -

Action scripts open a new window to open the URL in a new window, but not the fullscreen < P> OK, there are two ways to look at it - if you are using AS3 then you can either use the Navigating method Can: import flash.net.navigateToURL; Import flash.net.URLRequest; NavigateToURL (new URLRequest ("http://www.stackoverflow.com"), "_blank"); Or you have to contact Javascript and it will have to pop up to open a new window for you. If this is the case then the answer to that question is given here: Such a thing is a in fact common question - in the future you should kill Google before doing it Should have a habit of asking a question.

Silverlight Application - Embedded advertising possible with HTML or Silverlight? -

I have a 100% Silverlight application that takes the entire screen. Plan A: I would like to embed other Silverlight ads but I can not find any company providing this service. Plan B: Put Classic HTML Ads in the App I have found a way to play with DIV and Javascript but it seems like a major hack. can be solved "You can use the web service, Feeds the data, and then can display it. "

Dynamic User Menu in Django -

Is there a user menu that has changed the user group according to the specified permission, which is a user? I'm thinking something which checks these permissions at the scene level, and also removes menu options, which the user is not allowed to. Yes, it is possible to use the user object in the template and check whether the user is such an employee : {% user.is_staff%} & lt; Li & gt; ; & Lt; A href = "/ admin /" & gt; Admin & lt; / A & gt; & Lt; / Li & gt; {% Endif%} This would be an example where there are links to the items in your menu. Admin link will be provided only for users with is_staff status It can also be done with is_authenticated. Django is designed to separate logic and presentation, so if you want to have some of the better granular control of the menu, then I am logic inside the idea, and then set a variable that Which menu to show to determine what you can check in the template.

delphi - Incorporate Team Coherence version label into build -

Answer suggested as part of the version number using an SVN revision number during the creation of a release. I want to do something using team cohesions, which does not modify amendments in the same way How can I set up a build script for Delphi 2009 so that any number in each release Or can tags be linked to a specific team gathering check-in or version label? One way to reach the current version label would be great, though the solution that automatically updates will be better. I do not know how to do this (although I am interested in the answer, I use TC Myself) - but have you emailed Ewan to QSC? On some occasions, I need some help in doing something so that he responds very quickly and if he does not know how to do it, then you can not do it honestly - that TC developer! : -) support@teamcoherence.com

.net - How can I get a specific version of a dataset row? -

Using a dataset, there is a method called hasversion on each line, which means that it is original and current How do I get one of the original line values ​​for that line version? I thought it was possible to reject the changes in that line and then check the value, but I could not lose the change instead, just read the honor (s). If you are considering a particular line, then you can calculate through the surcharge of one You can get a specific version of the row values ​​from, e.g. some data rows [[0, Datewarversian.origial] // indexed by some DATA ["columnname", dativarversion.origl] // column name that With this, you may want to use the method on the data-eligible pass (near you, in your case, Detorovestate modified), then use the above values ​​for any of the above lines.

Sql Server modify select -

I'm sure there is no way, but for those experts, I'm putting it beyond my knowledge. What I am going to do, at the database level, is to change the selection statement of any kind before executing it. For example, I would like to do something like the following ... when someone executes the following SQL Select from the user MMSAG I want to capture it, select the user before it executes, and select . Reconent = ORIGINAL_LOGIN () I have to allow user limitations on data in a fashion similar to Oracle's VPD, without resorting to the idea of ​​the top of all my tables. Those who may need to be Unfortunately, this is not possible. Even Microsoft SQL Server Row- Therefore, if you really need the feature, then you need SUSER_NAME () or something similar- Individual- or WHERE sections Role-identifier in Sorry!

PHP dependant foreach loop -

I'm trying to complete here, to store a database, firstname, lastname combo is to be separated. I've already added new columns to the database to keep the first and last names. What I need to do now is to actually separate them and run a SQL update against the changes. Can someone give me a hand? Thank you. This is my code & lt ;? Php $ link = mysql_connect ('localhost', 'root', ''); Mysql_select_db ("test", $ link); $ Sql ​​= "SELECT * new_users"; $ Result = mysql_query ($ sql); While ($ line = mysql_fetch_assoc ($ result)) {$ foo [] = $ line; } Foreach ($ name $ foo) {$ _name [] = Explosion (',', $ name ['name']); $ _pan [] = $ name ['panamar']; } Foreach ($ PAN $ as PAN) {foreach ($ _ name $ name) {echo ' If I understand your question, then you have a name column Which is "first, last" and you want to change it with the first and last column The string change of SQL is pr

.net - Reading Comma Delimited Text File to C# DataTable, columns get truncated to 255 characters -

We are importing from CSV to SQL To do this, we are reading the CSV file and have a temporary .txt file Are using the schema ini. (I'm still not sure why this temporary file is being written, but in this way the code currently works). From there, we are loading datatables via OLEDB using the following connection string (for ASCII files). "Provider = Microsoft, J.A.L.D. 4.4; Data Source =" + Spat + "; Expanded Properties = \" Text; HDR = Yes; FMT = delimited \ ""; Our problem is that fields with more than 255 characters are cut off. I've read about this problem online and it seems that the text field is sorted by default in this way Go. I set my registry settings in ImportMixedTypes = Majority type and TypeGuessRows = 0 in HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Excel \ / Code>, hopefully mycolumns will no longer be interpreted as text. After doing this, the temporary TXT file is being written correctl

Calling PHP variables from inside a MySQL Database -

I am currently working on a CMS system that directly builds the website directly from the information saved in the MySQL database < / P> I have this problem: Within CMS, the user enters coding for a template The front of the site (frontend.php ) Variable calls where layouts are stored ($ template_header) Menu from the frontend database D also creates variable $ menu_code, which is also stored by CMS Within the template code, there should be a break for this variable, when it is run by the frontend.fpp It will be raised. This is what I am trying to do: inside frontend.php: $ template eheader Echo; $ Template_header inside & lt; Tr & gt; & Lt; Td> & Lt; Center & gt; '. $ Menu_code. ' & Lt; / Center & gt; & Lt; / TD & gt; & Lt; / TR & gt; When Frontend.php is run in IE, then it should look like: & lt; Tr & gt; & Lt; Td> & Lt; Center & gt; & Lt; Script & gt; The res

multithreading - Windows Service and Timers - Separate Processes? -

What is the difference between multiple timers versus multiple threads? I have a Windows service that runs in the background. There are about ten "sites" in that database that are loaded on the int. Each site is started in its timer object, and then the timer executes the code at intervals for each site. The code executed is from a static method in the main service class. What happens when two timers are executed at the same time? Are they executing in the same process? Does it have to wait for the first timer to exit it before entering any other timer? Are there any locking or running conditions to worry? Thanks for the insights. I think this is a .net question. The timers use threads shared in those applications' thread pools. Multiple timer callbacks will be executed concurrently, until the thread ends with the pool thread. Compare it to using dedicated threads. Dedicated threads will always be available to execute the code, but they keep the resou

.net - Json data has {d:"data"} -

I am writing jquery ajax code to call wcf service. In this case the WCF returns HTML as a string. How some data is returned in jquery {d: "data"} format, what is this element? Below is code $ Get ('& lt;% = ResolveClientUrl ("~ / AjaxServices / ListingBrowse $ (' # Newsdiv ') .html (data.d);}," html "); Additional "D" parameter has been added by the .NET framework as an additional security measure against XSS attacks (). It includes: / p>

ajax enabled wcf service can use get only, can't use post -

I have AJAX enabled WCF service, which I can call without having to post, though I work together But is there any reason for this? Does it require webmigration or something else? How my WCF service looks here [OperationContract] [WebGate] Public System Selection. Generic. INNafeble & lt; Listing display & gt; While trying to use Jquery AJAX, I added [WebGet] (string postcode code) Div class = "post-text" itemprop = "Text"> [WebInvoke ()] attribute - This should allow you to specify post, put, delete HTTP actions too, on your method. Mark

api - Custom command line utility. How? -

Recently, I have released an open source class - one of the major API gateways available in the API function Provides an HTTP-API access to send SMS messages. Now I want to create a custom command line utility, which can be available anywhere in the command line for the user, so he can send and send the SMS just like this console command: < Pre> $ my_custom_send_sms_command -u your_username -p your_password -k your_api_key 447771234567 'hello CLI' Please tell how this can be done? Updated: Class is written in PHP. Make sure you have the PHP CLI package installed on my Ubuntu VPS: $ apt-get install php5-cli Check that it is installed: $ / usr / bin / php - V Then, create a file with something similar to sendsms.php : #! / Usr / bin / php -q & lt ;? Php // command line parameters are in the format: // key1 value1. KeyN valueN number message $ username = ""; $ Password = ""; $ Apikey = ""; ($ X = 0; $ x &a

javascript - iFrame Validation -

I currently have an iframe inside my main page that contains several checkboxes, which need to take action before leaving the iframe That is, if the user starts checking checkboxes and halfway, then they click back to the main page, i.e. except for the iframe, I want to be able to net / validate that they have left the iframe And they are indicated with the message informing it, say with a "note: you will lose all the data entered here - leave: yes / no?" Type message. Any help / website will be appreciated. Thanks Tony It looks like 4guys article you need. It talks about onbeforeunload event. There is also some awesome stack overflow here, which is also about it. It appears that in reality, an IFrame does not actually fire. Bugger! Here is some sample code, although this should work. This will only work if you are in the same domain, otherwise iFrame will have to stop talking to your parents. I have not tested them in many browsers so that YMMV is there.

PHP Array of Objects Internal Navigation Pattern -

I have an array of objects, and objects in my 'neighbors' (next and previous objects) array) Is there an existing pattern to do? Perhaps the array should be wrapped in an object (since the object can only be added in the form of an array). It's also fine, I'm just looking for an existing good practice method. Like normal, you can add the next and previous fields to your object, or if you change it If you do not want to, you can create a cover object that will contain the original and will be for those fields or if the array is enough to store your global index within the array and then it is very easy to get to your neighbors.