Posts

Showing posts from April, 2013

linux - Flushing the page cache associated with an inode -

I have modified the block mapping in an inode and want to flush the page cache associated with the inode so that the new insodes are new The mapping will load from the disk. << P> Invalid non-pages truncate_inode_pages () - To flush dirty pages Invalid - Mapping_page () - To flash Some work is I found that the filemap_datawrite_wait function can be used to write dirty pages to disk and the updated page can be read in memory. - Bala

c# - Render Empty XML Elements as Parent Elements -

"postprint" itemprop = "text"> I need an awkward element where an XML to take some XML that is actually causing your application to be created Parents have to be chained in the form of elements. For example: & lt; Element foo = "bar" /> should be: & lt; Element foo = "bar" & gt; & Lt; / Element & gt; I'm not aware of any way that allows you to change this. Anyone know how to accomplish this? After I have increased so much that I could cancel the WriteEndElement () method, forcing it to write WriteFullEndElement () This was the trick. Note: which sees updates to my question, please note. IE was rendering XML in a brief form as soon as I opened it in Notepad, I realized everything was okay Public class FullEndingXmlTextWriter was working. XmlTextWriter {Public FullEndingXmlTextWriter (TextWriter W): Public FullEndingXmlTextWriter Support (Stream W, Encoding Encoding): Base (W, Encoding) {} P

MVC / ASP.NET design templates -

Any good site for downloading nice design templates (master page, css files) for MVC projects, or ASP for Cheap and beautiful.

MongoDB dbref in perl -

Is there a way to use the Perl API? It is neither anywhere nor anywhere. Here is a sample schema: book: name, publisher, isdn, {author} author: name, date of birth I could just add a field to serve as a reference but wanted to do it with dbref instead. There is no support for this, even though DBRs are just generalized, however, Can make themselves They have the form: my $ ref = {'$ ref' = & gt; $ Archive_name, '$ id' = & gt; $ Id}; See for more information.

git gc on machine with quota -

Simple question, I'm trying to run git gc on a machine with a quota . Pre-GC, I'm using around 18 GB, almost all of my clone GIT repositories. My disk limit is 25 GB git gc During operation, enough temporary files are written to disk to kill my limit and for this reason the git gc operation fails Go. I remove the .git / objects / pack / tmp_pack _ * after the unsuccessful operation and use back 18 GB, but I actually actually get the git Gc and retrieve a small display. Is there any fancy option (or series of other GIT commands) that I can use in which the first write> does not include 7 GB temporary files on the disk? Which part of gc is important to you? You can try to run git-prune and git-repack parts separately, with git-prune , and make sure the expired option if your repo has a ton of loose commodities, then they will help in advance. * With git-repack , you can probably mess up deeply and get some small enough window settings to run

Load MS Word files with AJAX -

I want to load dynamically load text (AJAX) from some Microsoft Word files in a webpage. Therefore, the first few sentences can be loaded in the tooltip on the mouseover over the essays and links written to me. Only if you have a parser I think the new format is a zip archive with XML Schema but The old one is the same binary. There are some parsers there. I know that the wouwer, but it seems that it is old. () This is probably something important to look for: And yes, forgot to mention how to do it :-) First you need to get the data through Javascript AJAX Should ask. The servers need to be careful of parsing and the text will be returned in javascript. It will be a pain in the ass I myself have not done this and I have never tried those pars, so I am not sure they are suitable for you. Images, stylesheets, etc. .... It is not certain that it will be usable. At least, good luck.

what is faster flex and Java or flex and php? -

We are creating a major webpacking for www. This is a social community site. And I would like to know the direction of the witch. What works fast, flex and PHP or Java and Flex? I have read that Flex and PHP with Ffp very fast (with AMFXT) But I have noticed that 90% of large companies in Europe are recruiting Java / Flex developers to develop major webpolicies. Our application needs to handle many users at the same time. Our application will be hosted in a datacenter, later it will be hosted by a major CDN provider. Our application contains shopping malls and videos of a community area (streaming and progressive streaming). Due to the nature of our business model, we think our app will attract many users throughout the day. So we have a webpage that works very fast. Java or PHP (AMF support) for database with a strong technique on backend: We will start with our SSL and will switch the switch to Oracle and then SAS. What is the right direction for our application? Flex and

How to bind more than one value to a DatagridTemplate column in silverlight? -

I have a button with one button to edit the row, but the ID key is not the only value, but the three values ​​I How can I set three values ​​so that I click on the button, I get three values ​​in the back code? Column & lt; Dg: DataGridTemplateColumn header = "edit" & gt; & Lt; DG: DataGridTemplateColumn.CellTemplate & gt; & Lt; DataTemplate & gt; & Lt; Button Content = "Adjust" DataContext = "{Binding WId1}" = "EditButton_Click" /> & Lt; / DataTemplate & gt; & Lt; / DG: DataGridTemplateColumn.CellTemplate & gt; & Lt; / DG: DataGridTemplateColumn & gt; I want to pass w1d, wId2, wId3. Also, string value wId1 + wId2 + wId3? It is possible to pass that value, please give me any advice about this, thank you very much. Why do not you bind the whole thing into datacentact using {binding}? In the back-code, you can contact the data type in your object type and access your desired

theory - Not-mathematical description of NL-complexity -

एनपी-जटिलता से संबंधित होना प्रतीत होता है, और मुझे एक गैर-गणितीय व्याख्या करना चाहिए (यह कि मेरे पास केवल पास है उस लेख में प्रयुक्त गणित के स्तर के साथ परिचित) कोई यह बता सकता है कि यह प्रोग्रामिंग और एनपी-जटिलता से कैसे संबंधित है? एल्गोरिदम जो एनएल- जटिलता मेमोरी स्पेस में चला सकती है जो समस्या के आकार के साथ केवल लॉगरिदमिक (बहुत धीमे) बढ़ती है। Inotherwords, इन समस्याओं को आवश्यक स्मृति उपयोग के संबंध में बहुत अच्छी तरह से बढ़ाया जाएगा - समस्या का आकार दोहराए और आप को पूरा करने के लिए एल्गोरिदम चलाने के लिए शायद ही और अधिक स्मृति की आवश्यकता होगी। मुझे नहीं पता है कि क्या एनएल और एनपी जटिलता सेटों के बीच सिद्ध एक सैद्धांतिक संबंध है। एनपी जटिलता उस समय से संबंधित है जब इसे प्रोग्राम पूरा करने में लग जाता है - जबकि एनएल जटिलता प्रोग्राम को पूरा करने के लिए आवश्यक स्मृति स्थान की विशेषता है। मैंने उस विकी लेख में नोटिस किया था जिसे आपने कहा था कि यह ज्ञात नहीं है कि क्या एनएल = पी यह असंभव लगता है क्योंकि इसका मतलब यह होगा कि सभी एल्गोरिदम जो बहुपद समय (w.r.t का आकार) में

iphone - UINavigationBar gradient details -

I am trying to recreate the format of a UINavigationBar. The background of the bar is prepared using a gradient, but it is not clear what is the default color and point in it. Has anyone done anything in this area? Adjust the colors of your choice from a project also show a background image if you want (ImageReady), and Apple's // #Lighter R, G, B, draws navbar like a #Darker R, G, B, a #define MAIN_COLOR_COMPONENTS {0.153 , 0.306, 0.553, 1.0, 0.122, 0.247, 0.482, 1.0} #define LIGHT_COLOR_COMPONENTS {0.478, 0.573, 0.725, 1.0, 0.216, 0.357, 0.584, 1.0} @implementation UINavigationBar (UINavigationBarCategory) - drawRect (zero): (CGRect) Rect {ifReady} {UIImage * img = [UIImage imageNamed: @ "navigation_background.png"]; [IMG DryNricket: CGRactMake (0, 0, self-frame size, width, self-frame size. Hight)]; } Other {// here instead simulate // You must adjust MAIN_COLOR_COMPONENTS and LIGHT_COLOR_COMPONENTS to match your app // color bar presents CGContextRef refer

ruby - Rails returns a 500-error (Not sure why) -

I am trying to do the rail work, but whenever I try to create my own scene, this 500 error So, where are I to follow the steps given here: I have set Ruby in C.: Ruby I Installed: \ Ruby \ RubyGums-1.3.5 and ran Ruby setup.rb In the cmd prompt, I got the railroad using the gem install rails President's . I have created a project folder in C: \ Ruby, and it was navigated to CMD prompt at CMD prompt, I ran Rail Project 1 , then CD Project 1 In the cmd prompt, I got the Ruby script / controller home index generated at the CMD prompt, I went to ruby ​​script / server << i> << i> There are errors yet. I go, and everything looks fine. I have to navigate and get it: We're sorry, but something went wrong. We have been informed about this issue and we will see this one soon. I do not have any clue why can I do some troubleshooting? When you enter Rail project name config-file with a database of your application Is set to use t

javascript - Using Ajax callback variable values in JQuery dynamic click handlers -

I am querying a simple Ajax that retrieves a variable-length list of values ​​as JSON data . I am trying to create a list based on this data which has click-functions based on the values ​​received from the JSN query. I can correct this by writing like HTML and methods like HTML: < Pre> function loadFooList () {var list_area = $ ("# sidebar"); List_area.html ("& lt; ul & gt;") $ Ajax ({Type: 'GET', url: '/ data / foo / list', datatype: 'Jason', success: function (JSN) {$ .each (Json, function (i, item) {var link_id = " Choosesfoo "+ item.id; list_area.html (list_area.html () +" ");}); list_area.html (list_area.html () + "& lt; / ul & gt; ; ");}}); } I do not like to write onClick-Function in HTML and I also want to learn how to create this functionality through the JQuery click-function. The problem is obviously variable-scrooping. My inexperienced effort will not work here clear

sql - SUM(a*b) not working -

Wo_parts and part2vendor . I am trying to multiply 2 table column row dots together, i.e. wo_parts is a field called qty and a field in part2vendor Which is called cost . These 2 include wo_parts.pn and part2vendor.pn . I have created a query like this: part2vendor INNER as total_score as wo_parts ON (wo_parts.pn =) $ scoreCostQuery = "SELECT SUM (part2vendor.cost * wo_parts.qty) Part2vendor.pn) WHERE WORKER = $ WORKER "; But if I add the cost of parts multiplied by the supplied qaantsities, then it adds a different number than what the script is doing. Help .... I'm new to this but if someone can show me in SQL then I can modify it for postgres. Thanks Without seeing the example data, we have no way to know that you query Why are yoga coming out in a different way when you do mathematics by hand it can be a bad insert, so you are getting more / less records than expected. It is also possible that your calculation is closed. Select

c# - Display SQL Server table in DataGridView -

I think this is a type of noob question, but I am new to SQL Server in .NET and I have previously It has lost several hours on this ... I started a new project, inserted DataGrid view on the empty form and as a data source, I chose Add-> Database and I created a new SQL Server database file . I called it DB.MDF. Now I get a binding source named DBDataset dataset and dbDataSetBindingSource. I added LINQ to SQL class in my project and pulled my table (where I added some lines before) in my .dbml. After this I pulled my DB dataset and pulled it into the designer and removed the same table. I hope you have an image now;) The thing is that when I run the program, the datagroup does not show anything in the scene. I know that I can dbDataClassesDataContext db = new dbDataClassesDataContext (); Var Record = db.MyTable from Rec in RE; DataGridView1.DataSource = Record; And it works right. But I believe dbDataSet and dbDataSetBindingSource should also work ... How to use them t

functional programming - What causes this Standard-ML type error? -

I was trying to create a tail-repeat version of this very simple SML function: Funny suffix [] = [[]] | Suffix (x :: xs) = (x :: xs) :: suffix xs; In the meantime, I was using type annotation on parameters. This is revealed by the following code, and causes a type of error (given below), but if I simply remove the type of annotation, then SML accepts it without any problem, the whole function is signed to the same signature Gives up the simple task of the above. Funny Prefix_tel xs = Funny Prefix_Helper [] acc = [] :: ACC | Suffixes_helper (x :: xs: 'a list) (acc:' b 'list) = suffix_helper xs ((x :: xs) :: ap) suffixes_helper xs [] Finally; Error: $ sml typeerror.sml Standard ML New Jersey v110.71 [Created: Thursday September 17 16:48:42 200 9] [ Opening typeerror.sml] val suffix = FN: 'a list - & gt; 'A list list typeerror.sml: 17.81-17.93 Error: Operator and operation do not agree [Uband match] Operator domain:' A list * 'A list list

Load JQuery into any page using Firebug -

Does anyone have a snippet to load jquery on any page with firebug? I often come to the sites I like to use familiar jq syntax. For example, say that I want to remove a list of prices from one page - it would be good to launch Firebug, install the gigery from Google CDN and type $ ('li.prices'). Everyone (...). Just seen it in

iphone - Adding effects to a MP4 Video? -

I want to do many things in an MP3 video, but I'm not sure where to start. Some things I want to do: - Change the color of the video to Black & amp; White, sepia, etc. - Add to animation, such as fade, fade, custom images / text revolving around - embed text in video Basically, basic features, video editing programs Is there a code library that I can use for an MP3 video? Or can I read somewhere to start? I have not got any specific information about this, especially the format of MP4 I am thinking that I have to implement any type of RGB conversion for each frame of the video for color effect, and possibly attach a video of animation which I have given MP4 video. EDIT: Thank you very much for the information I am trying to get this program to BTW. FFMPE is only for video conversions, so what I want does not do much. Puffadder has to provide the necessary information for me to understand what to do. Anyhow, thanks a lot! Sherwin, The MP4 video is not the f

windows - Light HTTP Stack for Visual C++ Project -

मुझे सिर्फ एक प्रकाश HTTP स्टैक चाहिए कुकी कोड के साथ, WinInet या WinHTTP के समान कुछ, क्या उन लोगों के लिए कोई अच्छा विकल्प है? ऐसा लगता है जैसे मुझे एक बग या सीमा मिलती है, जिस पर मुझे ऊपर लटका दिया जाता है।

asp.net - Making sure certain events are handled when closing browser window -

Some actions need to be done when a pop-up is turned off on our website. Note: The session is not an end, but only one popup is being closed. The solution we have so far has been catching the unload of the page and then pops up a page to complete the actions. When the new popup ends -> it hides itself and everyone is happy. The problem is with popup blockers, they prevent our finisher window from being executed. Is there any way to force this window to open? Is there a different way of executing this set of actions? (This function is similar to shutting down the server MF session which we have opened.) For example instead of a popup, jquery ui dialogs, then the code of the dialogue is on the same page and you can easily handle anything that happens on that page, stop the dialog, The other can pop and similarly ... cheers

java - How to convert / cast long to String? -

I have just created Sample BB App, which can allow the date to be selected. DateField CurDateFld = New date field ("Select date:", System content time milliseau (), datefield.det (DateField.FIELD_LEFT); date After selecting, I need to convert that long value to string so that I can easily store the date value anywhere in the database. I am new to Java and Blackberry development. Long date = curDateFld.getDate (); How do I change this long value for the string? In addition, I want to convert from the string so far. I think I can use the long l = long.Personal ("myStr"); ?

64bit - System32 Folder on a 64-bit system -

I have a CMD file that runs on 32 bit Vista system. I have noticed that the code reference for the System32 driver folder. I'm wondering if the code could potentially run on a 64 bit Windows 7 system, so I guess my question is, what is a system 32 folder in 64 bit system? Be very grateful for any answers. 64-bit windows are actually 64-bit files in the System 32 folder, and 32-bit Programs that are running under WOW64 are normally looking into 32-bit DLLs for system 32. Call - but they will get 64-bit ones instead. Therefore, the OS System 32 folder redirects all 32-bit applications requests to the SysWOW64 folder, which contains 32-bit system files.

actionscript 3 - Using the Loader display object to load X jpegs, then resize each of the images differently while they're on the stage -

Hey, I was thinking that it is possible I am able to load the image And it is easily displayed using the addChild (myLoader); The private private sector problem where myLoader is in the classroom is that whenever I call my function inside the range that connects the loader to the stage, it clears the old and this new one even here Keeps, even if I add a little bit where I change my letter. It has completed it is a serious barrier because I can not know anything about how I will need to load and write X times. The problem is that the URL is read from the XML file. My main wish was that my loaders used to be in a class-wide private array and I was always using my Array Push (my loader). The load was completed. Public class images expands Sprite {Personal Work Imagesloaded = 0; This is a problem that it is compiled but they never display Private Vair myLoader: Loader; ... public function picture (): zero {myLoader = new loader; // loop url calls a myLoader.load (imageURL) to

python - how to access sys.argv (or any string variable) in raw mode? -

I'm having trouble parsing the file path sent as a plea: if I type: os.path.normpath ('D: \ Data2 \ 090925') I'm getting < Pre> 'd: \\ data2 \ x0090 925' Obviously disturbing formatting \ 0 in folder name, I can fix it with the following : os.path.normpath (r'D: \ Data2 \ 090925 ') which gives 'D: \\ Data 2 \\ 090 925' ' My problem Or, how do I get the same result with sys.argv? Meaning: os.path.normpath (sys.argv [1]) I can not find a way to feed sys.argv In os.path.normpath () in raw mode to avoid problems with folders starting from zero! In addition, I know that I can feed the script with python script.py D: / data 2/090 925 , and it will work perfectly , But unfortunately the windows system stubbornly supplies me with '\', not '/', so I really have to solve this issue instead of avoiding it. UPDATE1 supplement: If I use scripts Test.py: import OS, sys if __name__ == '_

C++ binary file I/O to/from containers (other than char *) using STL algorithms -

Text after " I am trying a simple test of the binary file I / O copy of the data / copy of the STL copy algorithm Use and see a binary file below: 1 #include & lt; Iostream & gt; # 2 included & lt; Iterator & gt; 3 # included & lt; Fstream & gt; 4 # include & lt; Vector & gt; Add # 5 & lt; Algorithm & gt; 6 7 std using the namespace; 8 9 typingfed study :: ostream_itreter & lt; Double & gt; Oi_t; 10 typingfst std :: istream_iterator & lt; Double & gt; Ii_t; 11 12 At Main () {13 14/15 Stud :: Vector & LT; Double & gt; Vdi; For 16 (int i = 0; i & lt; 20; i ++) 17 {18 double d = rand () / 10,00,000.0; 19 vd.push_back (d); 20} 21 22 / binary file displays Output Output output ("temp.bin", iOS :: binary); 24 per (vd.begin (), vd.end (), oi_t (output, (four *) zero)); 25 output. Close (); 26 27 / one container 28 studs from binary file :: Vector & lt; Double & gt; Vi; 29 ifstream input ("te

What is the single character after a value called/exactly do in C#? (eg 1.00m) -

What is "called" when you add a literal ring next to some value value? decimal d = 1.00m; This is called suffix . From the article: If you want the literal verbatim to be considered as a decimal, then use the suffix m or m, for example:

php - Why can't I create a Doctrine model named 'Album' -

I am using the theory as the ORM in my project but is running against a strange error: Using the following I create my own model, but refreshing my page and automatically loading the models However, PHP meets this error: Fatal error: Class 'base album' was not found in E: \ sites \ dpp \ system \ application Strangely all my other models are just fine and those classes get base classes. When the names change something 'set' like 'album' it just works! Is not it weird ?! It seems that the use of 'album' is in any kind of conflict, though error message gives some more suggestions, changes in the plural album also do not work, anything else is fine! Any suggestions? Thank you! if option is set (default) generated in Firefox () in your case a class albumBase ( derived by default in the subdirectory) and an empty square increases album albumbase . To wit. If album occurs immediately, then albumbase is already known or lo

c# - WinForms TreeView.Sorted Property and VS 2008 Object Browser -

I can not see the above property neither in the object browser nor in intellisense for tree view, why is it? Although I can set it in my code, it successfully creates the project and when I click it and choose 'go to definition' it looks like a public bouquet property is it normal, or did I have anything Have you messed up? sorted attribute browsable attribute (false) Prevents the property from appearing in the grid, and with EditorBrowsableAttribute (EditorBrowsableState.Never) , which prevents it from appearing in Intellisense. So yes, this is normal: For whatever reason, the person who designed the API wanted to discourage you from seeing it.

php - Update in time in MySQL is not working -

I am trying to insert date time on MySQL DB. I have kept the area as VARCHAR (9 182) date_default_timezone_set ('Asia / Kolkata'); $ Timestamp = date ("m / d / y h: i: s a", time ()); $ Utimeprocess = "UPDATE tabelconf SET time_of_pstart = '.mysql_escape_string ($ timestamp). "'WHERE UniqueID ='" .mysql_escape_string ($ dbUniqueID) "'"; $ Result = mysql_query ($ utimeprocess); return of $ 1 result This means that it Succeeded. From: For other types of SQL statements, INSERT, updates, delays, drop, etc., mysql_query () returns TRUE to success or wrong on error.

java me - Which will be Best Level for Setting Obfuscating Mobile jar -

In J2ME, which interrupt level will be efficient to run an application in mobile. Are you talking about the level of obstrusance available especially in netbusiness? Progress is not said to be used in the oscillator, you can see different standards that each level passes through the underlying progressive while you move the slider. You can learn more about Progord here.

database - what are the fastest/Popular search technologies -

What is the fastest search technology in addition to relational DB searches? I have a collection of text files in each of these text files from different sources (bank / ladder / stock market), each row is a record, each row has some DB columns (share name / date of purchase / owner / ...) can be parsed in. It is not necessary that there are all fields in each row, if some text is not mathing any field, then I keep it in a separate column (column A). If the parser fails to find any column, then I just store the line in the column. DB search based on user input I think that search slows down after a few million records, I want to go to an alternative storage such as file system or any other indexed storage. What would be the fastest storage technology for this type of requirement? I am currently using SQLite DB because I want to rewrite the whole code, so it would be more than happy to me if any other storage technology can give me strong results. A high-performance, fu

gif - Layered Images in Microsoft SQL Server 2008 Reporting Services -

I need two images (transparent GIF) in a report in SSRS 2008. Has anyone ever done this? Thank you for your answers! Layer images are possible in SSRs, index properties of images using z < / Div>

smarty - Symbol in PHP I've never come across before -

I should rarely have, but I have never seen before it runs in search of a smartly plug-in's docuation . $ smarty = & amp; New Wise; the = & amp; Sign in specifically if you enter it in Google, it is ignored like any other search engine, what is used for it? goes to the signature of the same function: connect the function (& $ smarty, $ reset = false) why & Amp; Symbol? .

ms access - MSAccess: type mismatch in date column for sql query -

I have a table A table in MS-Access database This table contains a column called callmat N.A. There are 4 types of entries Dates (like 10/23 / Cell) How do I write a query to select all the rows of tables where the call data column - or NA or empty space I tried to write Select * From the table where Call_Date is not ('-', 'NA', ''); But its type of mismatch error I'm assuming that the Call_Date should be the string type in the table. Select from table * where IsDate (Call_Date) = true

java - JMX confuse(remote server control) -

मेरे पास कुछ टोमक और ग्लासफ़िश सर्वर हैं। और मैं उन्हें प्रबंधन करना चाहता हूँ "प्रयोग" - आप कह सकते हैं, लेकिन यह गलत तरीका है क्योंकि मैं हडसन प्लगिन लिख रहा हूं। मुझे शुरुआती बिंदु की आवश्यकता है मुझे अपने ऐप में एकीकृत करने के लिए कुछ की जरूरत है और फिर जब जरूरत पड़ती है या ... मैं बस अपने ऐप को दूर से के माध्यम से प्रबंधित करना चाहता हूं। एसएम जेएमएक्स के साथ (एक ही प्रलेखन से) <= "पाठ" / Li>

asp.net mvc - MultiSelectList problem, getting right type -

I'm having trouble with the selected getting items in a multiple selection I have done this: BookingObject bo = _bs.GetBookingObjects (bookingobjectID.Value). FirstOrDefault (); Bo.BookingViews.Load (); MultiSelectList BookingViewsBookingObjects = new MultiSelectList (_bvs.GetBookingViews (), "BookingViewID", "BookingViewName", (IEnumerable & LT; BookingView & gt;) bo.BookingViews.ToList ()); BookingViews & lt; -> BookingViewsBookingObjects & lt; -> BookingObjects Many of this make many connections. _bvs.GetBookingViews () IQueryable returns BookingView, and I can not seem to get the item selected bo.BookingViews. What can be missing here? Am I using the wrong type? / M Perhaps you will send real-selected value in the last parameter IEnumerable & lt; Object & gt; as IEnumerable & lt; BookingView & gt; instead of "BookingViewID", it is a IEnumerable & lt; Int & gt; if BookingView

linq to sql - How to deal with DateTime field when using LEFT OUTER JOIN in LinqToSql -

I have 2 tables, employees and absence I want to include the left outer so that I get all the employees and any related absences Can I In LINQ2SQL, I can use the following to create a LEFT OUTER JOIN: In an absence of empires. From the AE in the equivalent of Empireide X Select the default IFEmpty () new {FULLNAME = e.Surname + "," + e.Forename} " This is what I see but I started the absence of any I want to select new {FULLNAME = e.Surname + "," + e.Forename, x.StartDate} I can change the selection statement but I get an error because the datetime is not worth the faucet if there is no start date or actual date, how can I show an empty string? Trying to use StartDate.SortDateString () but it clearly throws an error, if it is empty, then I have also tried: choose new {alias = E. Name, StartDate = x.StartDate == Faucet? "": X.startout} But this does not work either. Any suggestions? Select write statement select new {FULLNA

vb.net - Working with Byte literals -

I am using the following function to brighten the color value (this is my lambda in code, but not her Should be a differentiated): <25> (by byte as byte) I + (255 - i) \ 2 termination function T compile, because the compiler defines 255 and 2 as an integer instead of bytes, resulting in type p. Hnank Unfortunately ,, so I just 255B can not write or do. There are some obvious solutions to this problem: Reduce function dysstenatu 255 (Byval I as Byte) Byte Returns I + (CBT (255) - i) \ CByte (2) Termination function and Reduce function DantTos-255 (Byval I as Byte) Byte Return CByte (i + (255 - i) \ 2) End function and decrease the function Distance TO225 (ByVal i as byte) Byte dim FF = byte = 255 Byte = 2 returns I + (FF - I) \ two termination function The first one is simply plain and ugly, because every has to be literally needed CByte d. Second, calculates in integer and then converts the result into byte, which is fine, but not as spectac

join - MySQL: get records from database and add a COUNT() column to the rows -

I am trying to retrieve books from a table and left to join in the table of chapters . From the second table, what I need is to add only COUNT () of the available chapters for those books and that value as an additional column named Chapter (or something). My current endeavor looks like this: SELECT B. *, Include chapter B as c. Chapters from chapter (c.chapter_nr) as books As C_book_id = b.id it only becomes one, the table of books and the count () results in that row, but I want to get all the rows from the table of books, Therefore the left pair SELECT b. *, B as the chapter from books in the form of counts (c.chapter_nr) B. LEFT JOIN CHAPTER C (c.book_id = b.id) Group B. ID explanation To determine the actual chapter calculations, you need a group according to the book If you wanted to leave the group by clause, Will receive a result of all chapters. You want to limit the results to unique books and related chapter calculations

Python static methods - how to call a method from another method -

When I have regular methods to call another method in class, I have to do this < But when I have static methods I Can not write self.dosomethingelse () because there is no example I want to call a static method from another static method of the same class, how do I do it in Python? Edit: Is there a mess, okay, I have edited this question back on the original question. I already have another question which is in the comments of Peter Hansen. If you think I should open another question for an answer already, please let me know. Class.method should work. someClass: @classmethod def some_class_method (CLS): pass @staticmethod def some_static_method (): SomeClass.some_class_method () SomeClass.some_static_method ()

python - Using Google App Engine to display a Rss/Atom feed -

I think of setting a Google app that only displays an RSS or Atom feed I am thinking that the feed is read once every time (at the push of a cron job or magic button) and ready to be seen in internal data, which is ready to see. It will be done in Python. I get a page telling me what I have to do. But she is considering assuming using some other Google products because it relies on Google API. I think there is something more that connects some new material, it is hosted on my machine locally, Google App Administrative panel, pushed a button and mine (locally hosted Done) Read the feed and copied . My questions are now: Is the RSS (or Atom, a sufficient) format adequately assigned to handle / edit / delete? is? Is there any flavor or should I be worried about it? Is this done before? Will save me some work Using an option library, which is the focus of most of these problems for you Another option would be to use a PubBubub-powered service, which will give you

c - Send a raw ethernet packet from inside a kernel module -

I found that I need to create a new sc_buff strait in the kernel module and pass it on my network device, but I do not understand how to set the straight variable for a simple raw ethernet packet. It should be easy, but I appreciate it, if someone can give me a sample code to put together a skybuffer. Take a look at the function packet_sendmsg_spkt for the inspiration net / Packet / af_packet.c Edit: An original code has been added: P> Int sendpacket (straight socket * sock, structure net_device * dev, __be16 proto, zero * data, size_t lane) {struct sock * sk = sock-> gt; Struct sk_buff * skb; If return (! (Dev-> Flags and IFF_UP)) --ENETDOWN; If (lenan> dev-> mtu + dev-> hard_header_len) returns- EMSGSIZE; Skb = sock_wmalloc (sk, len + LL_RESERVED_SPACE (dev), 0, GFP_KERNEL); If return (skb == NULL) --ENOBUFS; / * FIXME: Save some space for broken drivers which automatically type * hard headers at transmission time. PPP * is a remarkable one, i

JavaScript document outlining in Visual Studio 2008 -

समस्या / प्रश्न: जावास्क्रिप्ट फ़ाइलों के लिए दस्तावेज़ रूपरेखा काम नहीं कर रहा है दृश्य स्टूडियो 2008 में। क्या यह अभी भी समर्थित है? यदि हां, तो मैं इसे कैसे सक्षम कर सकता हूँ? अगर यह समर्थित नहीं है, तो क्या कोई भी निशुल्क प्लग इन समान कार्यक्षमता प्रदान करते हैं? नोट: यह मेरे लिए दृश्य स्टूडियो 2003 में काम करता था उन लोगों के लिए बहुत निराशा होती है जो जावास्क्रिप्ट का भारी उपयोग करते हैं इसे आज़माएं: आपको अपने कोड में क्षेत्रों ("# //" क्षेत्र ") जोड़ना होगा, लेकिन फिर मैक्रो से क्षेत्र का संकुचित होना पड़ेगा। एक अन्य विकल्प को उजागर करना है कुछ कोड और करो CTRL M + H यह हाइलाइट किए गए कोड की रूपरेखा देगा, जिससे आप कोड को विस्तार और संक्षिप्त कर सकते हैं। दुर्भाग्यवश, जब आप डॉक्टर को बंद करते हैं तो रूपरेखा खो जाएंगे।

PHP errors are not displaying on the page you are developing. You only have SFTP Access to change files. How do you display the errors? -

PHP errors are not showing on the page that you are developing. You only have to change the SFTP access How do you display errors? Try to enable error reporting on the script: Ini_set ('display_errors' is true); Error_reporting (E_ALL);

php - What is the best way to implement strong security standards for $_GET id's? -

I want the strongest security measures for people changing IDs for comments, blogs, inboxes etc. ... Any suggestions? Confirming the data you received is a great idea, if you are expecting points, make sure Do that you get points. if (isset ($ _GET ['id']) & amp; amp; and amp; ctype_digit ($ _gET ['id']) {$ id = $ _GET ['id '];} And {$ id = 0;} If your concern is changing the URL to see things like people, such as requesting an image 44, If you wanted to show, you have got a few options: Ensure that the user has the proper permission to use the item.Include various tests on the page. URA to make the item disqualified Do not use sequential numbers, use random numbers or hash.

actionscript 3 - Mapping a 2D object to 3D space, maintining 2D size -

I have a papervision3d area primitive that I am adding to a view. Area is being done with the radius of 285. However, due to my camera properties (zoom, focus and jade) the area is rendering at 206px rather than 570px which is what I want (2 * radius). A long time ago I received a blog post about this topic and it was explained that you can set Z of any object in the scene to appear in 3D space, it will be 2D Space will appear in the following: mySphere.z = (this.camera.zoom * this.camera.focus) - Math.bas (this.camera.z) + Radius; The above work when I was using multiple blocks, where radius width was changed with 2 / for some reason it does not work for the area. How to get an idea with 570 px diameter to show any thoughts on the screen, but the pointers? Thank you. This can not be achieved, at least not properly. Perspective projection does not map any sphere into a circle. See how the areas located on the edges of this image are being distorted?

Building a winform app in VS for windows 7 x64 - get an error on install -

I have a Winform application that I have designed in VS 2005 that works fine in Windows 7, but when I I try to install it on X64 I get an error: "You need to run the 64-bit version of DPINT.XA on this machine. Contact the seller who provided you this package Done. " In the VS I think the build set on 'any CPU' should handle up to 64 bits, I think the error is much online on any idea? Do you need to make changes to the VS before building?

php - How is MVC more convenient? -

I have a large website, I have time to convert to a good custom framework, which I make for my needs Know how all this works Someone else bites I'm all bloat To know it, just kick For, But, after making it in different ways, many times ... I feel that "feature" provides this, code becomes increasingly unaware It is difficult to keep track of files (especially if you are the only developer on this project), and even there is no real awesome document. At this point, I really need to understand ... how can this change my life again? It has been answered, but to put a better point on it, I think that one The attribute which is not / when MVC is not, has scalability: MVC allows explicit separation of duties (i.e., front-end versus database codes). MVC is a pattern that implements uniform coding habits. Maintenance increases because it is easy for new project members (which understands MVC) to mess up the codebase. If you are the sole proprietor o

ruby on rails - How do I route user profile URLs to skip the controller? -

Now my user profile urls are like this: and the user The controller indicates the show method. What would I like to do? The user profile url offer is like this: So, how to pull the path and how the controller magic Should be? I agree about what JCM says about this. This is not a terrible idea and it is used by two major social networks Facebook and MySpace. match http://example.com/username look like this: map.connect ': username',: controller = & Gt; 'User',: action = & gt; 'Show' If you want to go to the subdomain path and map profile on the URL such as http://username.example.com/ subdomainfu plugin and the resulting path This will look like: map.root: controller => 'User',: action = & gt; 'Show',: conditions => {: Subdomain = & gt; /.> These broad, must be defined in the final routes to catch all routes. RB, so that they are of the least priority, more specific routes will be mat

SAML Request - Declare Multiple Protocol Bindings -

I have implemented a SAML service provider to support Single Sign On for ASP.NET Web Portal, which is a Shrink-wrap software is configured on customers' sites and should be able to interact with any SAML-compliant identity provider. My Attendance Consumer Service (ACS) page will accept SAML response through both GET and Post methods. As I understand the SAML protocol, SAML request protocolbinding property specifies which protocols are supported for feedback I currently , My request specifies HTTP-Redirect binding. However, I would like to announce that I support both HTTP-Redirect (GET) and HTTP-POST (POST). After searching through more SAML documentation, I care about repeating, I am unable to find syntax to declare several supported protocol bindings (or it is also valid for doing so). When I can declare this configurable, my priority will be to declare both bindings so that the identity provider works without additional configuration of my portal. Below is a

jquery - Fluid CSS Grid structrue possible? -

Short and simple version: I have a project where I need to define divis that will repeat the horizontal and wrap it on the next line when the line outside the space (table-like grid) I've seen mention of jQuery.GridLayout, but the demo / Homepage is 404 so I do not have any clue if this is what I see. Just, I'm trying to get it: Div.ItemClass Div.ItemClass Div.ItemClass Div.ItemClass Div.ItemClass Div.ItemClass Div.ItemClass Div.ItemClass ... < / Code> The trick is to force me to use the same category (I have access to an optional item template, which will insert different codes for each optional item), But I need to 'stack' them horizontally until they move out of the horizontal position and then the next line 'Wrap' in Ti Quick Background - The project is inside a CMS system, and item listing module gives me the following template files to work from inside thanks P > Edit: OK, so I'm a fool and forgot Rule # 1 - Check your source (sung

html - Jquery - Find a select element inside a parent DIV -

मेरे पास माता-पिता div है: & lt; div id = "ctl00_MainContentAreaPlaceHolder_deliveryOpen" class = "Delivery_open" शैली = "प्रदर्शन: ब्लॉक;" & gt; // बाल चुनें एलिमेंट & lt; चुनें class = "txtfield ckgcountry" id = "ctl00_MainContentAreaPlaceHolder_DeliveryPersonalInformation_country" नाम = "ctl00 $ MainContentAreaPlaceHolder $ डिलिवरी व्यक्तिगत जानकारी $ देश" & gt; & Lt; विकल्प मान = "DE" & gt; ALLEMAGNE & ​​lt; / विकल्प & gt; & Lt; विकल्प मान = "टीएफ" & gt; TERRES AUSTRALES FR। & Lt; / विकल्प & gt; & Lt; विकल्प मान = "TH" & gt; थाईलैंड & lt; / विकल्प & gt; & Lt; / चयन & gt; & Lt; / div & gt; मैं ड्रॉपडाउन मूल्यों को चयनित आइटम को बदलने का प्रयास कर रहा हूं: $ j ("div [id * = 'deliveryOpen'] & gt; .txtfield ckgcountry ") removeAttr ( 'चुना')। OR $ j ("। Delivery_ope

Javascript or jQuery for Adding Style to Phrases on Page -

I am applying a style to my website and again for a certain phrase. Is there a way to find the page for instances of that phrase and automatically apply that style? Example: & lt; Div & gt; This is what you & lt; Span class = "comp" & gt; Company name & lt; / Span & gt; get from. We & lt; Span class = "comp" & gt; Company name & lt; / Span & gt; But here do all kinds of things. & Lt; / Div & gt; You can take a look at these questions: Both top answers point to jQuery.

How can I print list elements separated by line feeds in Perl? -

What is the easiest way to print all the list elements in line with Pearl feeds? "$ _ \ n" @list for print; In Perl 5.10: @ Ask for a list; Another way: include print ("\ n", @list), "\ n"; or (5.10): join "\ n", @list; or about it: print map {"$ _ \ n"} @ list;

Fogbugz database schema management -

This is a very simple question, and perhaps he can provide insight on himself :) < Do anyone know how to make Fog Creek a database schema management? I am running on any issue and I am trying to figure out if I am handling it properly ... I have a module that every person spins their site And checks their database so that they can be sure that they have the correct change. If they are missing out on the changes, then there are changes in the script. My problem is that I was trying to bind it to the session_start part of Global.asax, but it seems that many times, and I am trying to come up with a better scenario. For reference, I am trying to run 1 x web application which can respond to any number of hosts, where the host map through the metabase to find out that What is the database and then makes the necessary connection. it is

excel - How to generate application forms/documents programmatically? -

Currently, we use MS Word and MS Excel to match merged documents, which were sent to many receipts should go. However, I want to automate this process, such as a form of a website where the complainant can fill his name, address and other details, and we will use that to automatically create that complaint. And present it for download (primarily as PDF). Now, the only solution that comes to mind is Latex, so I can replace just the necessary institutions and can only compile PDFs. However, that bit is to be discussed with the webhost, if they are giving latex or not. Is there any other solution? Any other way we could do that, should there be no problem to offer some web hosting solutions? Edit: I have a non- I like the NET or non-Microsoft solutions, because the server is running Linux and mono may be able to work, none of our god knows any .NET language. However, if necessary, we may have to enter into it. Generate PDF using an XSL Check for: You will need to create

php - foreach through a session variable -

I would like to repeat on each object in my session variable 'item' is a type of item which is a book that I The book is designed to store information. I have made a count ($ _ session ['item']) which gives 1 so I thought it should be repeated at least once but no luck thank you foreach ($ _SESSION ['item'] as $ item) {echo test; $ Sql ​​= 'SELECT * item with WHERE item_ID ='. $ Item- & gt; Get_Item_ID; Var_dump ($ sql); } Why are you archiving objects in a session variable? The object must be able to serialize and deorize, which you can store in a cookie. I think $ _SESSION can only store strings and arrays. >

c++ - Is it necessary to learn Java for contributing to an open source project? -

I am more in C / C + but many of my senior people in college will ask me to learn Java if I I want to contribute to the open source project .. I am in a dilemma. We can not do a design project in C / C ++? Open source C and C ++ projects - as well as Load in Bharati language in any other language May be. Of course, this is never a bad idea to learn another language, but "only" is not bound to know and C ++. If you want to contribute to a specific open source project which is written in Java, of course, this is a different matter ... but if you are trying To find C & C ++ open source projects, some major hosting sites support the inquiry by project language, I believe. For example, you can see and.

C#: How to TDD a file downloader -

I want to create a simple downloading tool. Give it a list of URLs, a target directory and hit it. This will then download those files and dump them into the target directory enough simple. But, I would also like to practice TDD. But how would you do TDD in such an application? There is something that downloads the file Some files that write to disk discs < Li> One User Interface Actually the user interface can not be TDD and will be downloaded and written by most common common classes. Which download works, which is a silent container and is not very interesting for TDD ... How will you make TDD like this application? Or is it an application where TDD really does not understand? The indicator needs no sign of how and how to start: p If you are different then you can make TDD user interface heavier application Logic out of user interface This is MVC in short, a conceptual way of doing this is expressed in class diagram (model dropped): < Pre> +

sharepoint - Modify osssearchresults.aspx page of WSS -

We have an application where we call Search Corre Rehalt Web Part XSLT Moss Search Results Page (Results.aspx ). Is it possible to do some custom javascript for the application level page of WSS i.e osssearchresults.aspx? You can not change the search results page in the WSS installation, you need to customize your masterpiece a little bit. Change that behavior. This is the default: & lt; SharePoint: Delayed control runat = "server" control id = "small search input box" /> But you can control some javascript to decide for yourself the link (jQuery sample ): & lt; Click script type = "text / javascript"> $ (".ms- etter (" href "," # ") (function () {// redirect to new page, selected area and keyword}}; The selector gets under the A element under the .ms-searchform class, which has a strong> ID attribute "To get the scope and the keyword, this is a similar approach.

java - How to manage a custom user object in session when Spring Security autheticates user? -

When authenticates the user, it creates a UserDetail object and it is available to find the current user id in the web-app. is. But suppose I want to change user user or user department with preferences and other details about custom user object. So, when Spring safety is successfully authenticated, how can you add custom user objects to the session? How to remove custom user objects from the session and when the Spring Security log-in user logs out Or is there a proper way to do this? This is the best way to IMO that one of your services (probably user service) is called UserDetailsService Be applicable and specify the spring security XML that you want to use your User Details service. What the userDetailsService must do is implement a loadByUsername (String Username) method This method applies to UserDetails that will need to return a category. It may be your own custom object that you like. The advantage of this is that you can access the property properties from JSP

ASP.NET MVC 1: DataSet ModelBinding -

I am in a situation where I am being given a dataset for output in a MVC view. I am really struggling to know how the modelbender can get the way to get it back after submitting it. I have something like this ... Public Action TestData () {DataSet Data = New Dataset ("DS"); Datatyal table = new datatable ("DT"); Data.Tables.Add (table); Table Columns Add ("id", typef (int)); Table Columns Add ("name", typef (string)); Table. road. Add (1, "John"); Table. road. Add (2, "Mark"); Table. road. Add (3, "Paul"); Table. road. Add (4, "Chris"); See Return (data); } [AcceptVerbs (HttpVerbs.Post)] Public Functional Test Data (Dataset Data) {Return View (Data); } On the page I have tried many names for the input elements but it has no use. Is it also possible that I would be using a view-model type if it was possible, but unfortunately it is completely dynamic structure and the most natural thing to use is a

Log4Net and .NET 4.0 -

There is no log-4 net release for some time. It has not offered any problem with 3.5, but what about NAT4? Has anyone heard of any rebilling to release version 4 to support the framework? .NET 4. Projects You can still use log4net. The target platform for ".NET Framework 4" needs to be changed ... " Correct but you have to enter the line & Lt; / Startup & gt; below the configuration file (after log 4 net setup): & Lt; / ConfigSections & gt; & Lt; Log4net & gt; & Lt; Appender name = "file explorer" type = "log4net.epadder.php fileper" & gt; & Lt; File value = "logfile.txt" /> & Lt; AppendToFile value = "true" /> & Lt; Layout type = "log4net.Layout.PatternLayout" & gt; & Lt; Conversion pattern value = "% date:% -5level -% message% newline" / & gt; & Lt; / Layout & gt; & Lt; / Appender & gt; & Lt; Root & gt;

flash - Video resolution on webpage -

I have a flash video file to display on the website. Flv files are in 1024 × 768 size. But, when I am How can the video size handle on the webpage? Text "itemprop =" text "> You usually want to display the video at your original resolution, the scaled video looks bad, more processor time is required, and scaling down is a waste of stream bits. To re-encode FLV from your source for resolution; Most encoders have a better scaler than the player. Either way, 960x720 is an ambitious resolution for Flash Video. Many users will not have the power to easily play it back.

Python reference problem -

I am experiencing a very strange problem (for me) in Python. I have a square menu: (snippet) class menu: "" fixed item "" menu_items = {} letters = map (chr, range (97 , 123)) Diff __int_ (self, menu_items): self.init_menu (menu_items) def init_menu (self, menu_items): i = 0 items in menu_items: self.menu_items [self.characters [i]] = item i + = 1 When I instantate the class, I am in a list of dictionaries, dictionaries are created with this function: def menu_item (Description, verb = none): if action == none: verb = Lambda: Any returns {"description": description, "action": Action} and then the lists are created like this: t = [Menu_item ("abcd")] m3 = menu.Menu (t) = A = [menu_item ("test")] m2 = menu.Menu (a) b = [menu_item ("update", m2.getAction), menu_item ("Add"), menu_item ("Delete")] m = Menu. Menu (B) When I run my program, I get the same menu items every time .

cocoa - DivX Decoder libraries? -

I saw a DLL named "DivXDcoder DLL" in an application from a major software vendor - which means I (A) That's easy to use DivX library, and (b) I would prefer to play Devildx compressed films in any product that I work on. The DivX project focuses on creating itself. The codecs and tools for end users are any C / C + friendly projects that make playback of DivX content possible in Win32 or Cocoa apps? Look at MPlayer sources - it uses the FFMPEG library which handles decoding from several formats .

c# - Gridview sort reveals far more than anticipated! -

I need some help here, I am currently making goals in the circle. I have a gridview protected void btnSubmit_Click (object sender, EventArgs e) {if (radTopx.SelectedValue == "" || txtbxHowMany.Text == "" : That a radio button is filled with item based on the selection of the item) {MessageBox.Show ("Please make sure that both the 'appropriate number of product' is selected and selected before you run X Effort "," Top X Error !!! ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); GridView1.DataSourceID = Faucet; GridView1.DataBind (); } And {int max = 0; If (int.TryParse (maximize txtbxHowMany.Text, outside)) {GridView1.DataSource = this.GetMaterialData (session "[MemberKey"] toString (), radTopx.SelectedItem.Value, "Primary", Max.); GridView1.DataSourceID = string.opt; GridView1.DataBind (); }}} Where is GetMaterialData code: Private Object GetMaterialData (String MemberKey, String MaterialType, Strin

duplicates - Homework: Lisp items that appear more than once in a list -

Looking at a list, I am trying to return a new one whose only one is the first The list that appears more than once in the bar, I get the list as a parameter. I did the following: (defun myf (lista) (if (endp lista) zero (if (member (first list) (rest list) (app) (Myf (rest lista))))) If I run the following: (myf '(AABABC) )) , it returns (AAB) . How can I return items only once (i.e., double A is not)? Vincent, Gisu and Jerry indicated that you need to know that The result is already included in the list, while Derek indicated that you can modify the original list when you see that an item has been repeated. Read the documentation of the adjoin and functions This is very useful reference, add it to your bookmarks. Those two functions do not modify their logic, but as a result, they return as a new list. There are other functions that modify their reasoning and thus can be more efficient, but at this time you probably should not have to worry about th

c# - Additional try statement in catch statement - code smell? -

Status: My application needs to be processed on the first step of business rules (initial effort - catch statement) If a certain error occurs when during the process phase If I call the Auxiliary method, then I have to switch to the second process in the catch statement. The backup process uses the same assistive method if the same error occurs during the second process, then I have to stop the whole process and throw exceptions. Implementation: I capture in hold before in statement another try-catch statement was to try-catch statement. // Start the initial process {// Initial information helpful method string s1 = "value 1" used; // Call Assistant Method HelperMethod (s1); } Catch (exception E1) {// Backup information if the first process supports an exception method in string s2 = "value 2"; // Try the catch statement for the second process {try HelperMethod (s2); } Hold (exception E2) {throw E2; }} Is this code odor? If so, what would be be

iphone - How to get older SDK and do I need to? -

The OS 10.6 on my Mac. I started with the iPhone SDK for Snow Leopard, which is from SDK 3.0 to 3.1.2 Makes for I'm ready to submit my app in the store. I think old iPhones should also use it. I can not find Apple Link for SDK 2.2. Only 3.1 Link to SDK. Do I need to release an app created with 2.2? If this is the case then where can I find this? Can the iPhone users update the OS on their phones? Thank you,