Posts

Showing posts from July, 2012

ruby on rails - friendly_id and new records -

I am using friendly_id 4.0.0.beta8 and want to generate url which uses slug, but Still the model is id It seems that friendly_id first generates slugs before_validation However, at this time (before saving) there is definitely no Model ID available and so creates friendly ID without slug. How can I ensure that the new records will be slashed with the ID after initial saving? I'm the author of Frugal ID. tries to solve the problem that exists on the text ID without numeric ID with the Friend ID. So if you're just getting model ID in the lattice, then you probably do not use FriendlyId to avoid that extra complexity and that model; You may only be able to override the toparor: def to_param "# {id} - {title.parameterize}" end

flash - Embed an SWF file in Flex and interact with ExternalInterface functions -

I use a SWF file that exposes functions and events using ExternalInterface. Here is an example of an exposed function: ExternalInterface.addClallback ("myfunction", ExecuteMyFunction); If I embed a file in an HTML page, then I can use those functions using Javascript. Now, I'm dynamically embedting a similar SWF file in Flex using the MX app: SWFLoader component, like something: & lt; Mx: SWFLoader id = "myLoader" source = "http: //localhost/file.swf" autoLoad = "true" /> I am trying to reach those exposed functions and events, but I have not found the way to interact with them with the Flex app. I would like to be able to call functions like javascript, like: myLoader.myFunction (); How can I use a function that is exposed to an external frame inside Flex? Basically you need to do something like this: Var mySubApp: * = (myLoader.content as a SystemManager). Application; MySubApp.myFunction (); There ...

jQuery - Determine user vs programmatic event -

मेरे पास & lt; select & gt; है और मैं change () घटना जब उपयोगकर्ता चुनिंदा विकल्प को बदलता है तो मैं कई कार्यों की एक श्रृंखला करना चाहता हूं। लेकिन, अगर मैं $ (item) .trigger ('change') के माध्यम से बदलाव को ट्रिगर करता हूं तो मैं कार्यवाही की शृंखला को निष्पादित नहीं करना चाहता। मैं एक अधिभार देखता हूं मापदंडों। मुझे यकीन नहीं है कि यह काम करेगा क्योंकि मैंने एक कस्टम इवेंट नहीं लिखा है। तो, उपयोगकर्ता द्वारा निकाल दिया गया घटना और मेरा प्रोग्राममैटिक निकाल दिया गया ईवेंट के बीच अंतर को निर्धारित करने के लिए मुझे क्या करना चाहिए? ऐसा करने का एक त्वरित और गंदे तरीका है: var progChange = false; $ ('चुनें')। परिवर्तन (फ़ंक्शन () {if (! ProgChange) {// उपयोगकर्ता कार्रवाई ...} progChange = false;}); फ़ंक्शन कॉल सेलेक्ट चेंज () {progChange = true; $ ( 'चुनें') को बदलने ()।; } आप इसे अनिवार्यतः उसी तरह से ट्रिगर विधि से कर सकते हैं, और यह वैश्विक को खत्म कर देगा, जो एक अच्छी बात है: $ ('select')। परिवर्तन (फ़ंक्शन (इवेंट, ...

decorator - Python: Overriding a Unknown class -

इस उदाहरण पर विचार करें: x = a.some_class_instance x.foo () मैं x.foo () की तर्ज पर कुछ करना चाहता हूं @ x Foo () def dec () प्रिंट 'डेकोरेटर' x.foo () क्या ऐसा करने के लिए कोई रास्ता है? धन्यवाद:) आसान तरीका यह करना है: X.foo = dec (x.foo) उदाहरण के वर्ग का विस्तार करने का दूसरा तरीका x = a.some_class_instance वर्ग विस्तारित (x .__ class__ ): @ डीईसीटी एफई (...): ... लेकिन मुझे ऐसा करने का कोई अच्छा कारण नहीं देख सकता।

mysql - Join tables only where value not in table B -

I am trying to join 2 tables and are not showing a value that does not exist. Table_Items: item_id, title, etc. Table_History: item_id, history_id, action, date Many possible actions (purchased, added for each disk) , Played, smash, etc.) Each action takes an item_id by link table_new line in history. The query that I'm searching for will return all the disks which are not ripped. My query returns many rows, everything is returned because there is at least one entry in the history table for each item. SELECT items.item_id, items.title AS heading, item. / Creator, history. Skip item from item Join history at item Iitem_id = history.item_id where history. The process 'Arp% No' group item by using the .item_id title I'm using Mysql help would be appreciated! You are welcome. Just add the action filter to include and then empty (anti-joint) in which SELECT items.item_id, items.title AS heading, item. 'Authors / Producers', History Exclude act...

c# - How can I loop through a DataGridView created on the main form in a BackgroundWorker? -

I want to loop through a datagrid view that is mainly exporting data to a CSV file in a background vendor Designed for Backgroundworker has been made on a different form where the progress of exports will be displayed through the progress bar. Here is the export form code, which is called BackgroundWorker: Private Data Grid View Export Grid; Public Zero Export CSG (DataGrid View Main Grid) {this.exportGrid = mainGrid; // Set progress bar maximum progress. Bayer 1 Max = main grid Rows. Calculation; If (backgroundWorker1.IsBusy! = True) {// Start Asynchronous Operation Background Worker 1. RunWorkerAsync (); } // Show this look ShowDialog (); } Private zero background by 1_DoWork (Object Sender, DoWorkEventArgs e) {BackgroundWorker worker = Sender as BackgroundWorker; // Write data rows foreach (DataGridViewRow line in ExportGrid.Rows) {// Check if the background worker has been canceled (worker.CancellationPending == true) {e.Cancel = true; break; } Else {foreach (DataGridViewCel...

asp.net - How to properly configure Spring.NET in a web context -

I have a problem keeping the values ​​from appearing in the scope of all users. I'm not sure what I'm doing wrong, but I'm finally on intelligence. I'm thinking that I have a container object wrong or I'm crossing values ​​with WebContacts. First of all, it is what I am doing in code. It works, but it is showing details for the first user who logs in the site (Note: My pagestore is only a type of type IDictionary which stores values ​​for sharing all user controls on the page ): using (basepage page = (basepage) (spring.web.ui.page) .content.Handler) {if ((Page. Page Story ("Login ID ")! = Null)) {this.Model.LoginId = Convert.ToString (page.PageStore (" L OginID ")); }} Second, I have tried various scopes for my objects but I am coming out here. Here's how my object is currently configured in the container: / P> Snippet of my business category configuration & lt ;! - Transaction Management Strategy - Local Database Tran...

Django Admin, Show Aggregate Values From Related Model -

Is it possible, within a single Django adapter model, to collect fields from related objects For example, I have a student object that has a test object for a fiction. The test object has the "score" field Can I score points in all the students' exams and put it in the admin display_list attribute? For example: class fixturesman (admin.modeladmin) : List_desp = ["id", "title", "date", "number_fine_matmount"] def queries (self, request): qs = super (fixtureAdmin, self) .queryset (request) return qs.annotate (num_fixture_metas = count ( 'Fixturemeta')) DEF num_fixture_metas_count (auto, obj): return obj.num_fixture_metas num_fixture_metas_count.short_description = 'stability calculation' num_fixture_metas_count.admin_order_field = 'num_fixture_metas' However, AFAIK, You type this method, Can not click on these areas through the administrator in the form of num_fixture_metas from to .nota...

How to remove "Welcome to the Setup Wizard" text from Visual Studio Installer project -

Image
I have a visual studio installer project that I am creating in Visual Studio 2010 and unable to find out how Welcome to the "[Product Name] Setup Wizard" lesson from the wizard's dialog box. For example: How can I delete the "Welcome to the Setup1 Setup Wizard" text from the screenshot below? This is not supported by Visual Studio Setup Projects Editing MSI with Orca to modify control text for a solution But if you have to do this after every creation, then you can either leave it like this or use another setup authoring tool Allows you to customize your installation interface.

web services - How to generate soap request xml from wsdl file in java -

As a parameter, search for some Java Openers API to create a soap request xml file with wsdl_URL and operation name Actually, soap U is doing this and I tried to go through soap UI source code, but I am not able to understand the whole code to complete my work. Is there a Java API available to do this I spent a few days in the net and I did not see any results. If any body has any thoughts then please help me. > Thanks in advance. You can use open-source membrane SOA library () to generate XMLs for you Every operation defined in the WSDL: create public zerom templates (string url) {WSDLPers parser = new WSDLPiras (); Definitions wsdl = parser.parse (url); Stringworld author = new stringwriter (); SOARequestCreator Manufacturer = New SOARequestCreator (); Creator.setbuilder (new markup builder (author)); Creator.setDefinitions (WSDL); For (service service: wsdl.getServices ()) {for (port port: service.getPorts ()) {binding binding = port .getBinding (); PortType Po...

database - Xcode: SQLite in embedded method -

I'm working here with a new problem I started with the following code: - (IBAction) Login: (ID) Sender {const char * dbpath = [databasePath UTF8String]; Sqlite3_stmt * statement; If (sqlite3_open (dbpath, and contactDB) == SQLITE_OK) {NSString * querySQL = [NSString stringWithFormat: @ "where contacts SELECT * login = (\"% @ \ ") and p = (\"% @ \ " ) ", Login. Text, password. Text]; Const char * query_stmt = [querySQL UTF 8 string]; If (sqlite3_prepare_v2 (contact DB, Kweri_stimti, -1, and statements, zero) == SQLITE_OK) {if (sqlite3_step (Statement) == SQLITE_ROW) {// store '1' when a user wants to log in to be in the ** If (LogSwitch.on) {[auto aStayLogged]; } And {[a resale ged]; } ** Model * Model = [Model Sharing Model]; Model.paramLogged = Login.Text; // [self disclosedsection view: zero]; } Else {status.text = @ "Login failed: Please check your ID and password"; } Sqlite3_finalize (statement); } Sqlite3_close (Contact DB...

Saving multiple forms efficiently using Django's Form Wizad and the issue of missing list indexes -

I am using the Django form wizard in my app. There are five forms in total, although only three or four can be presented, because on the basis of one particular condition or two special forms, two forms can be omitted. The contents of the list back by SessionWizardView method are as follows: [& lt; Test.myapp.models.AForm object> 0x0177EC10, & lt; Test.myapp 0x01333540> test.myapp.models.EForm object; 0x01796910 & gt ;, test.myapp.models.DForm object at & lt; 0x01796530 & gt ;, test.myapp.models.CForm object at & lt; .models.BForm 0x01796150 & gt ;, Object on & lt; ] I save the following forms: one = form_list [0] .save (committed = false) a.save () B = form_list [1] .save (committed = false) b.parent_id = a b.save () c = form_list [2] .save (committed = false) c.parent_id = a c.save () d = form_list [ 3] .save (committed = false) d.parent_id = a d.save () d = form_list [4] .save (committed = false) d.parent_id = a d.save () As yo...

How to access iOS accelerometer in Delphi XE2? -

How do I use the accelerometer in iOS using Delphi XE2? I tried to look at the IDE but did not get a component. Delphi XE2 supports OSX deployment on a Mac. One is deployed on the iPhone, but it still involves using XCode as a final deployment tool. Since Delphi does not "officially support" the iPhone's hardware deployment, I suspect that there is any component that is specific to it. Disclaimer: I have downloaded the Ax2 just a few hours ago, and I only deployed a Mac application yet (and it worked beautifully). That's why I am away from the specialist. EDIT: Anders Ohlson has clearly written the accelerometer component for the EXE 2, but I have not tried to do this.

javascript - Making ExtJS 4 grid content selectable -

The grid in extss4 (save) does not allow content to be selected by default. But I want to make this possible. I have tried this grid configuration: viewConfig: {disableSelection: true, stripeRows: false, getRowClass: function (record, line index, lineparm, store) {Return "X-selectable"; }}, With these CSS classes (basically I can see in Chrome targeting every element): / * Firefox And allow grid text selection in webkit based browsers * / .x-selectable, .x-selectable * {-moz-user-selection: text! Important; -khtml- User-selection: Text! Important; Webkit-user-selection: text! Important; } .x-grid-row td, .x-grid-summary-row td, .x-grid-cell-text, .x-grid-hd-text, .x-grid-hd, .x-grid-row , .x-grid-row, .x-grid-cell, .x-unselectable {-moz-user-select: text! Important; -khtml- User-selection: Text! Important; Webkit-user-selection: text! Important; } I know that you can override the grid line template in the 3 extensions below, but I do not know how to do this ...

css - Javascript - getElementById returning null despite elements with given IDs existing on page -

Many functions to show and hide different divs on the page by applying style classes named "hidden" and "hidden" This function is to hide several divs at once using "visible" setAttribute. Each "div" is listed in an array with the "hidden" class given ID. Each div can have more than one class, so when a div is given a "hidden" square, then it should be protected, except the "visible" class, to the other class (sas) . function theater section () {// Initialise array with div IDs var divs = new array ("tab-1", "tab-2" , "Tab-3", "Tab-4", "Tab-5"); // for loop through divs in array (var number = 0; calculation & lt; divs.length; count ++) {// get current classes var div = document.getElementById (divs [count]); Var divClass = div.getAttribute ("square"); // Remove the "visible" square if it is divClass = divClass.replace ("visible...

How to create CSS internal style sheet in CakePHP -

I have been using KPHP for some time and recently need to send an email from an app. Unfortunately I can tell CakePHP how to include CSS in the document as an internal style sheet instead of a link. I know people think that this is a bad idea, but my app is just sending an email to our company, so I'm not too concerned about someone's email client. If I just want to include the link which is not working because this reference is wrong, although I link the link to a full link (rather than http: //myserver/css/myfile.css/css/myfile.css) Can be a second best option because they have access to my server. If there is no way to do this in a cake, then to read the contents of the file is just a quick way to use PHP and dump it into view? I think I can do this with the controller, though it seems like a bad hack. Any ideas will be appreciated, thanks You can use readfile () to print in. Or you could $ this-> gt; ; Html-> Url ('css / yourcss.css', true) ...

ios - When archiving app, Xcode thinks my Icon@2x.png is meant for iPad and not iPhone 4 -

Image
मेरे संसाधन फ़ोल्डर में मेरे पास ये आइकनों हैं: Icon.png Icon @ 72x72 सभी के अनुसार, मेरा मानना ​​है कि मेरे ऐप को पुराने iPhones, iPhone 4, और iPad का समर्थन करना चाहिए। हालांकि जब मैं अपने ऐप को लॉन्च करने के लिए तैयार करता हूं, तो मुझे यह त्रुटि मिलती है: आईकॉन @ 2x.png आईफोन 4 के लिए नहीं है? यह आईपैड के लिए इसका उपयोग करने की कोशिश क्यों कर रहा है? यहां देखें: मुझे लगता है कि आपका iPad ऐप है चिह्न -72.png आवश्यक है Icon.png और Icon@2x.png की आवश्यकता नहीं है।

jquery - Nivo Slider hiding my CSS Menu -

It has been seen that this question has been asked before, but I can not work with the solutions given to it; Site I changed the Z index to 99999 on all menus, yet it is also down. & lt; Div id = "slidercont" & gt; & Lt; Div id = "slider" & gt; & Lt; Img src = "http://digitalstr.com/wp-content/uploads/2011/09/ibfconpromo.png" /> & Lt; Img src = "http://digitalstr.com/wp-content/uploads/2011/09/irconspacepromo.png" /> & Lt; / Div & gt; #access {background: # 3b95bd; / * Show a solid color for older browsers * / clear: both; Display area; Swim left; Margins: 0 auto 6px; Width: 100%; Z-index: 99 999; } Menu {margin-top: -20px! Important; Z-index: 99 999; } # Access ul (font size: 13px; List style: none; Margin: 0 0 -0.8125em; Padding-left: 0; Z-index: 99 999; } # Reached (float: left; Status: Relative; Z-index: 99 999; } # Access one {color: #EE; Display area; Line-height: 3.333em; Padding: 0,21...

android - Layout don't fit emulator -

I have a layout that works correctly in my Android phone milestone, but when I use the emulator I do, it looks very big. I have tried a lot of configuration of the emulator, but does not work any ideas? thank you in advanced. & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: orientation = "vertical" Android: layout_width = "Fill_parent" android: layout_height = "fill_parent" android: background = "@draubable / Fendo 2 "& gt; & Lt; LinearLayout Android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: layout_weight = "1" & gt; & Lt; TextView android: text = "" android: gravity = "Center_horizontal" Android: textSize = "6pt" Android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" Android: layout_weight ...

objective c - If statement to check username and password entered in an iOS app -

I need help with the IF-else statement, to know if the username and password match . There will be two text fields where the username and password, username and password are not valid, the user will have to submit a submit button and a label below to display an error message. After the username and password are valid, the Model View will dismiss and will take the user to the main page of the app. Below is a valid username and password: Username: user1 Password: test123 My existing code does not work below. if (usernameTextField.text == @ "user1" & amp; password; TextField.text == @ "test123") {statusLabel.text = @ "Success!" ;; [Remove from Self Modul Vij Controls permission: Yes]; } Else {statusLabel.text = @ "Wrong, Please try again"; } Any help would be appreciated. Thanks! :) I do not think there is anything wrong with your code. However, try to compare string values ​​with the isEqualToString method and not ==. ...

Git: How to edit/reword a merge commit's message? -

How can I edit or modify a message in a merge commute? git commit --amend head what comes before git rebase If you code> - gets protected - merged option (or Instead of underlining the history, ribbing, and you merge form, it will try to preserve its git merge at git rebase -i command, its option, -p Should also be able to improve: git rebase -i -p HEAD ~ 5

select - MS Access INNER JOIN most recent entry -

I'm having trouble trying to accept my SQL query on Microsoft Access 2007 but this is to throw syntax errors for me I have two tables, let them easily call customers and commands. I need some customer details, but some details are also the most recent order I currently have such a query: SELECT c.ID, c. Name, c.Address, o.ID, o.Date, o Customers filled with customers Price Inline Order Order on O CID = o. Customer ID and OAid = (Select the top 1 ID from the order where the customer ID = CID order date DESC) For me, this is valid, but access keeps me throwing a syntax error. And when I hit okay, he chooses a piece of SQL text which is not related to it. If I take an additional selection clause, but it works clearly You can not use it and the way in MS Access, along with where to replace it, you have two reserved words in your column (field) names - name, date should be attached to this table bracket when someone Table name or nickname is not predefined, or bette...

windows phone 7 - PerformanceProgressBar eats 50% of CPU even when invisible -

I use PerformanceProgressBar control from Silverlight Toolkit for Windows Phone. I see that once a display bar The page is displayed, the CPU goes up to 50% in the emulator and IIDaidMetnet / Visibility / enabled properties remain disabled even after it is disabled. Has anyone seen this? Not sure whether it is only an emulator behavior or it is also on the phone. Thanks in advance. You should not only change the visibility status when using the display display bar, but changing the ISINitirman property accordingly needed. If you set the bar view set, set to true, if you hide it, set the IID condition set to false. This should solve your problem.

jquery tools Overlay: Open an overlay on based on ajax response -

I am trying to open an overlay on a button click. The button has an AJAX call attached to it, which should open an overlay if it returns an error, but the overlay will not open on the success. What happens is that the overlay opens regardless of success / error in AJAX response. This button opens on click, not on Ajax response. What am I missing here ??? What I'm trying here ... // Overlay Setup $ ('# Post Question'). Overlay ({Target: "#template"}); // Ajax Call Setup $ ('# Post Question'). Click (function () {$ .ajax ({url: '/ ask_away', data type: "jason", data: {question: 'some'}, type: 'post', cache: wrong, success: function Reaction) {Warning ("This was a success");} Error: Work (request, error) {$ ('# Post Question'). Data ('Overlay'). Load ();}});}); & Lt ;! - HTML here - & gt; & Lt; Div id = "template" & gt; You got an error & lt; / Div & gt; ...

c - How do memory fences work? -

I have to understand the memory fence in multicore machines. Say I have this code core1 mov [_x], 1; Mov r1, [_y] core2 mov [_y], 1; Mov r2, [_x] Now there will be unpredictable results without the memory fence that both R1 and R2 can be 0 after the execution. In my opinion, to combat that problem, we should keep the memory fence in both the codes, because keeping it as only one will not solve the problem still. Something like this is ... core1 mov [_x], 1; Memory_fence; Mov r1, [_y] core2 mov [_y], 1; Memory_fence; Mov r2, [_x] Is my understanding correct or am I still missing something? Let's assume that architecture is x86, besides, someone can tell me how to insert the memory fence in the C ++ code? Fences can perform serial operations; they can perform fences (loads and reserves), i.e., execute fences No other operation can begin till, but the fences will not be completed till all previous operations. This is derived from Intel Intel by me...

Sending ACTION_CALL Intent in Android containing hash # sign -

I have problems that hash has been disconnected Does anyone know any solutions? The use of Unicode or% 23 is not working in my case. Now the dialed number is * 101 string uri = "tel:" + "* 101 #"; // string uri = "tele:" + "* 101 \ u0023"; Intent to intent; Intent = New Intent (Int. Action_CALL, Uri. PRSE (Yuri)); found a solution: string encoded hash = Uri.encode ("#"); This move was ...

Things to Consider in Making an "Account Controller" in ASP.NET MVC 2 -

I use VS by using empty ASP.NET MVC 2 template. 2010 I am creating a site and for my log-in / security my account controller In order to prepare and take into account the DB, I need to create a model for the user account. The main techniques or methods that I should consider making myself account controller? There are no specific things that you should consider when creating account controllers, consider creating any other controller Design view model Controlling functions such as showing entry forms and handling form submissions, such as 2 login actions (one for GET and one for POST) If you manage things like forgot passwords, password change etc. Want to ... this may also be an action on this controller When the login is successful and you are using it for a refund, the user should initially make sure that you use this URL Are to avoid spoofing related to your domain. Make sure that the administrative action that receives the user name and password is accessible...

php - Live search using AJAX: How to implement the server-portion -

I am creating a simple case management system for agents of my company and I thought it was implementing some form So, here's the situation, and a question: I have a table (or, rather, an view ) with the following columns : 1 First name, 2. Last name, 3. Phone, 4. Category 5. Owner, 6. Status, 7. Manufacturer (For each of our sanitary ware, St or (n) varchar or 'any other representation of string') I can definitely search for each column and then present the result, but know about the script There will be no way to do what the result (or 'suggestions') will be most relevant to the user. So, how do you actually implement an live search from the point of view of the server? I definitely like to search through SQL, but I can not use stored procedures, possibly even though it is possible, it is not limited. Edit: (for clarification): I want to find my column and return the result for user searches The closest and most relevant (similar to Goog...

gitsharp clone http protocol failed, but git protocol success! why? -

I use gitsharp, when I want to clone the project via http protocol, I will disappear But when I use the GIT protocol to clone the GIT hub with the same project, this success! HTTP transport implementation of GITSHPP is buggy, sadly, as the transport through SSH Your only option is to get the code and to debug it in the code to find out. Hopefully this is easy to fix;)

git - Migrate Bugzilla Issues to github Issue Tracker -

I want to migrate all my issues to issue tracker at github.com () (You receive a repository per track tracker ) 1) Are there tools? 2) How did you do it? Thanks for any advice, I will finally write a summary that how I did it in the end (not manually!) You have to export your issues with Bugzilla, and then use the GitHub API to upload problems to GitHub: (Note that import-import is done through the old GitHub support channel) This means that your problem number Or change, so you can add a 'Bugzilla-ID' footer for your problem description so that you as far as your data is exported from Bugzilla, I think your options Here are the following: Bugzilla's HTML Export Bugge La Connect directly Good luck! If you write an export script, then I encourage you to open it on the butt!

php - values not push on recursive array -

Let me explain my problem I try to generate an array of categories. This is my job. Personal function recursive concert ($ id_parent, $ level, $ ranges) {$ tree = array (); Foreign exchange ($ categories as category $) {if ($ id_parent == $ taxonomy ['id_parent']) {$ tree [$ level] [] = $ categorie; $ This- & gt; Recurring categories trade ($ categorie ['id_category'], ($ level + 1), $ ranges); }} $ Tree returned; } When I locate the loop with the echo, everything works, all parent categories and girls are covered, but they are not pushed into the array. here ([id_category] = & gt; 4 [name] = & gt; birds de tachà © es [id_parent] => 1) [1] = & gt; Array ([id_category] => 5 [name] = & gt; Aquavaer [id_pay] => 4) [2] = & gt; Array [id_category] = & gt; 6 [name] = & gt; Sà © rie 100 [id_parent] = & gt; 5) [3] = & gt; Array ([id_category] = & gt; 7 [name] = & gt; [id_parent] = & gt; 6) [4] = & gt...

image - Reducing PNG file size in .NET -

I often use OptiPNG or pngcrush to reduce the file size of my PNG images. I would like to enable this type of thing to program from within a net application. I'm dynamically generating PNG which is sent to a mobile device, so I want to downgrade the file. Image quality is important, so in this case PGG will definitely win on JPEG. Is there an existing library that I can use to do this? why don 'you have nominated any application from within your application using a command parameter Or, if this is not possible, then use Windows Automation.

java - Accessing a class with the exact same name -

I have a difficult question and I'm not sure it is also possible in Java. I am in the following situation: I have got a category which uses another class, let's call it B. Now, I'm trying to write the third class (and I do not like it), I call it again (to make sure that 'b' is what the square means, I'll put it in the rest of this post B1 and B2 would say, okay?). All three classes live in three different jar files so far all is well. In general, class A finds class B (1) on A classpath and will use it. But now I am putting JR-files in which B (2) was started at the beginning of the class, so Class A would get this class instead of the old class. So my class B can work just like the old class B (1) (which is a library in reality, I can not customize it any other way). That's why I'm doing this ...). And here comes my problem: In my class B (2) I want to load the actual square B (1) and use it. I can do this by using reflection so far I can a...

object - Does using instanceof help and java cast type exception hits performance? -

I use legacy libraries and need to use the cut object in the archive. To avoid the exception, I'm thinking of using the example. So ask questions: 1. If I use the example - try the trick. Hold exception to avoiding exceptions. 2. Does it perform performance? Thank you. If you use instanceOf You do not need to try-catch (classcastexception e) . exampleOf is guaranteed to work, even with null s In today's VM, casting Do not show any criteria performance. Rather, if you start casting many more times, then revisit your design. Note: For example, does not work with generics due to errors.

linux - Permission denied for .iPython after installing django-CMS -

Using the most recent package - This requires a package I have installed it and now error me Can not pass through: [Ernő 13] Permission denied: '/var/www/.ipython' changed the permission of the folder And it did not work. I have also manually created the file - but then the error is: [error 17] File exists: '/var/www/.ipython' My google-foo is faulty to solve this. The permissions on this folder have changed for the current user I used to login. Is there a specific user I can not know about this folder? Fixed! After the advice, I did more to get it done: It is working: chmod 777 on the original folder should have a .ipython file chmod 777 Created once on the Epithath Chmod again on the original folder at 755. works! It seems that this file will be executable - I definitely do not want that in my main folder, so I allow it to be created and then return my changes. Thank you for your advice with the user you / var Trying to rea...

java ee - difference between facade and business delegate pattern -

What is the difference between mask and business representative design patterns, both are not used to hide business logic from the customer? Delegation customer and actual execution, usually hiding / filtering / increasing some functionality of the implementation from the client . The mask is providing a curriculum-encrypted API that hides more complex logic and / or coordination, usually several implementations that work together, and usually as the convenience of the client. Examples of each from Java: Representative: Collections.unmodifiableList () gives a list that keeps the original list and representatives of all the methods For a reference, but the exception breaks if its mutator methods are called. Mask: If you've ever seen the ridiculous amount of code, the first thing you make a utility method to hide all the ugliness - this method can be considered a mask.

mysql - php progressive map generation -

Image
Hello, I've been trying for a few days to write a script to make a progressive map using PHP. What I am trying to achieve but nothing will happen with success: In short I have a "node" which is defined as xy on 5,6 (as an example), then add a random number of "player" to "node" . From here I want to add the closest "player" to the node, when there is a list of criteria, it determines how to add "node" (how many connections are there for this node, maximum number of connections etc) I have not written any code yet, because I do not know where to start with or what to do with it because I am not very good with that great mathematics with PHP. Any help and advice of Andy is welcomed. Well, I think the network you want to create a topology is the Internet provider in the form of a router . So, I'm thinking that the best way to make a graph is the root red point, compared to players associated with it compared to the player...

c# - Windows, .NET reading text under mouse cursor -

Is it possible to receive text below the mouse cursor from a window by working in the background? Yes you can use P / Ewok some points: I suppose you attach the thread input to allow you to read the text with the control of another process.

.net - infopath query and sql injection problem -

How do I protect my site from SQL injection when I'm getting? Description = value from url and searching the object in the XML column in the database with the specified value? Here is the sample code: from sqlQuery = string.format (@ [data] "+ schema + @". [MyOBjects] WHERE " Data.exist ('/ data ["value" = \ "{0} \"]') = 1 "+", property, value); Thanks for any help about the following View the article to protect your code from SQL injection: In your case, you want to use parameterized queries. Checkout "Step 3. Use Parameters with dynamic SQL". You can do anything like this: string connection string = "..."; String schema = "..."; String value = "..."; (SqlConnection connection = New SqlConnection (connectionString)) {string sql = string.format ("Select [data] FROM {0}. [MyOBjects] WHERE data.exist ('/ data [\" theValue \ "= sql: variable ( \ ...

iphone - Delete Button in UITableView -

When I edit a contact, I want a delete button in my UITableView like addressbooks die. Is this a custom cell or UIButton? To create a button, you can: Style your UITableView style grouped . Add the +1 section to your table. Custom table ( Red background and with appropriate label)

internet explorer 9 - Rendering SVG shapes with crisp edges in IE9 -

आईई 9 एसवीजी आकृति रेंडरिंग = "क्रिस्प एडिट" विशेषता का सम्मान नहीं करता है। यहां एक नमूना एसवीजी है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8" स्टैंडअलोन = "नहीं"? & Gt; & Lt; svg xmlns = "http://www.w3.org/2000/svg" height = "600" id = "svgroot" संस्करण = "1.1" चौड़ाई = "800" x = "0" y = "0" & gt; & Lt; लाइन शैली = स्ट्रोक: # 000000; स्ट्रोक-चौड़ाई: 1 पीएक्स; स्ट्रोक-अस्पष्टता: 1 "y2 =" 300 "y1 =" 300 "x2 =" 750 "x1 =" 50 "आकृति-प्रतिपादन =" कुरकुरा " / & gt; & Lt; / svg & gt; यह फ़ायरफ़ॉक्स और सफ़ारी के नीचे सही तरीके से दिखाई देता है, हालांकि रेखा IE9 और IE10 (प्लेटफ़ॉर्म पूर्वावलोकन) के तहत ब्लैक होल्ड दिखाई देती है क्या एंटी-अलियासिंग को निष्क्रिय करने के लिए कुछ समाधान आईई 9? धन्यवाद! आपको बस 0.5 लाइन को पालने में सक्षम होना चाहिए आकृति रेंडरिंग के बजाय ...

PHP access object property through constant's value -

I have a Player class in which assets: $ Infantry, $ vehicles and $ air. is when dealing with players, I do not know which property is being used as an array, which used the properties to use to create a random order Shuffle is done. I try to use it, but it does not work. Strange, it does not give me an empty property error, so I think this is pointing to some property: & lt ;? Php $ typeOrder = array (_INF_, _VEH_, _AIR_); // _INF_ const = "infantry" etc. $ turnOrder = $ typeOrder; Shuffle ($ turnOrder); {$ AttType = $ turnOrder [$ i] for ($ I = 0; $ i & lt; 3; $ i ++); Print $ p1- & gt; $ AttType; }? & Gt; How do I get into a constant with a fair value in a property? Thank you. It should work - as long as $ p1-> Infantry etc. What is PHP giving you exactly the error? By the way, let's look at one.

c# - convert class string to class -

I have the code below in my ASP.NET app, I would like to change the converter name variable For class and this is the FillRequest & lt; T & gt; Pass in the method. Is this possible? var converter name = HttpContext.Current.Items ["converter name"] as string; FillRequest & LT; Web2ImageEntity & gt; (Request.Params); Alternatively I can var converter name = HttpContext.Current.Items ["converter name"] as string; If (converter name == "web 2 image entity") filwist & lt; Web2ImageEntity & gt; (Request para); But I have around 20 unit squares and I want to find a way to write code. This will not be possible because the generic type must be specified at compile time. What you can do is to change the FillRequest method to be something like below and then use reflection to do the desired work FillRequest (string [] parameter, type converter) {// Type the object from the converter and call the req method} Or take...

Magento Database Transaction -

How can I insert data into multiple tables in a single transaction and rollback in Magento if there is an error in the process? ? I can write custom questions and use the transaction, but I like if I can do this using Magneto methods. You can try the grain: getModel ('core / resource_transaction'). Documentation for this is as it is. But perhaps more useful, it's an order to use it to make an invoice.

c# - How to use Moq to test a method with no return value? -

This is my first question, please be kind! :) What I am trying to do is write a test for a manager class that during the construction many new examples of single item class are added in the list. When UpdateAllItems is called in this manager category, it is intended to iterate the intent list and make an incremental call to each individual item. The manager class is my code, but the single item class is not the same, so I can not modify it. I use NUnit for a test framework and I'm starting to work. . Because the manager class uses the single item class, I think I'll need to use a Moq, so I'm just testing the manager, not a single item. How do I test a test for my UpdateAllItems method? (Technically I should know the first test). Here is some sample code that gives me the general idea of ​​working with it ... public class single-id codecuntbofified {public int-current value {received ; Private set; } Public Single Entity Discounted Entitlement {CurrentValue ...

ruby on rails - Resque, Devise and admin authentication -

By using rescue and device, I have roles for user such as: User.first .org # = & gt; Admin User.last.role # = & gt; Regularly I want to set up an authentication for Resque, so, I have it inside config / routes.rb: Namespace: Admin Mount Rescue :: Server.New, AT = & gt; "/ Rescue", as in: = & gt; : Resque end And, of course, it is accessible to all log users. Is there a way to use a role from a user? It should be accessible only by users with 'Administrator' role Thank you very much. Use a path interrupt in your routes.rb file: resque_constraint = lambda do | Request | Request.env ['warden']. Certified? And request.env ['warden']. User.admin? End hurdle resque_constraint mount resque :: server, at: = on & gt; "/ Admin / resque" end Look at this and comments Hope it helps you.

image processing - Looking for Chromakey library in Java -

I was wondering if anyone knows about Kromkeli's library which is written in Java? To congratulate the existing Java development, I am looking to edit the content of a green screen image using Java. I know that there is a C library called Open CV which provides this capability much more, and was hoping someone could point me as Java. exists there Researchers in the area of ​​first-hand computer vision The rapper provides for libraries commonly used by: OpenCV, FFMPEG, Libed C 1394, PGR Flycatcher, OpenConnect, Video Input, and ARTLKitPlus. Also take a look at the JAI (Java Advanced Imaging API), and look at it. Note that Jar is difficult to hide in Oracle's Java website. My opinion is that there is a lot of scope in the field of applications of more scientific communities in Java. I have not seen anything more satisfying for computer vision in Java, if you want to go to computer vision and more advanced stuff but still want Java, take a look. If not, switch...

Disable cufon on selected element -

Is there any way to disable cufon on all elements in the selected div? Almost on the whole page I use cufon but I want to be in a diva ARL. is there any way? I have tried something like element: no (class) but without any result. Update: I also do this Trying, it seems that a solution has been found! Select selector: Cufon.replace ('h1, h2: no (. Question), .pageheader', {color: '-linear-gradient (white, # 777777))' , Font Family: 'Uniscience', Text Shadow: '2 Pixel 2 Px RGBA (0,0,0,1)'}); This does not include class h2.question at least cufon replaced in Firefox, Safari, Chrome and IE. :)

c# - ProgressBar as background for DataGridView rows -

Is it possible to set progress bar in the form of background for the DataGridView line? Or only one part of the line from left to right? I have rows that represent some dynamically changing data and I have to show this progress somehow I want to use a full line background as a progress bar, how can I do this? If you want to use the entire line then it is best to override the DataGridRow Using DataGrid.RowStyle , you then burn a progress below other content, for example & Lt ;! - Rest of the default template here - & gt; & Lt; / Grid & gt; & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter Property = "Template" & gt;

PHP Blank Values Inserted In Database -

I am using PHP and MySQL Here I am simple to insert name, email The form is used, phone number I have confirmed all the data: (PHP code after submitting ...) $ error = array (); If (isset ($ _ POST ['name']) and $ _POST ['name'] == '') {$ error [] = "Please enter a name"; } If (isset ($ _ POST ['email']) and $ _POST ['email'] == '') {$ error [] = "Please enter email"; } If (isset ($ _ POST ['phone']) & $ _POST ['phone'] == '') {$ error [] = "Please enter phone"; } Finally enter the data using the query below. if (count ($ error) == 0) {$ error = "" ; And query the matab ('name', 'email', 'phone') value (mysql_escape_string ($ _ POST ['name']), mysql_escape_string ($ _ POST ['email']), mysql_escape_string ($ _ POST) ['Phone'])); Redirect to success ..} This works fine, but for some time I am getting $ erro...

javascript - enter in asp:TextBox clicks my button (which has a js function bound to it) -

मूल रूप से मेरे पास यह है: & asp: textbox runat = 'server' / & gt; & Lt; बटन आईडी = 'बी 2' & gt; हाय & lt; / बटन & gt; & LT; स्क्रिप्ट & gt; $ ('# बी 2')। क्लिक करें (फ़ंक्शन (ई) {e.preventDefault (); चेतावनी ('आपने बटन क्लिक किया है;);}); & Lt; / स्क्रिप्ट & gt; समस्या यह है कि जब पाठ बॉक्स के अंदर प्रवेश मारता है तो बी 2 पर क्लिक होने वाला इवेंट तब होता है, इसलिए मैं जेएस फ़ंक्शन निष्पादित करता हूं , किसी को भी यह कैसे रोकना है? एक टेक्स्ट बॉक्स को ध्यान में रखते हुए रिटर्न / एंट कुंजी को दबाए जाने पर उसी तरह से प्रस्तुत किया जाता है जैसे सबमिट करें बटन। आप जो कर सकते हैं वह आपके फ़ॉर्म में सभी टेक्स्ट बॉक्स में एक कीप्रेस ईवेंट हैंडलर संलग्न करता है, और केवल वापसी कुंजी प्रेस को अनदेखा कर सकता है। कोड ऐसा दिखता है: $ ('input [type =' text ']')। कीप्रेस (फ़ंक्शन (इवेंट) {if (event.keyCode == 13) {event.preventDefault (); चेतावनी ("दर्ज करें!"); }}); ध्यान दें कि मैं...

Need help with RegisterWindowMessage and SendMessage from c++ to c# -

मेरे पास यह कोड C #: [DllImport ("user32.dll") में है। Charset = CharSet.Unicode)] स्थिर Extern यूआईटी रजिस्टर WindowMessage (स्ट्रिंग lpProcName); [DllImport ("user32.dll")] निजी स्थिर extern IntPtr SendMessage (IntPtr hWnd, int संदेश, IntPtr wParam, IntPtr lParam); और मुझे इसे सी ++ से सी #: UINT UWM_UART_CTRL_TRS =: RegisterWindowMessage (_T ("BT_UARTCTRL_TRANSFER") से परिवर्तित करना होगा;); :: प्रेषित संदेश (एचडब्ल्यूएफआरएफआरएडीसीएटीटी, यूडब्ल्यूएम_यूएपीसीआरएलआरआरएस, 0, 0); और यह: UINT UWM_UART_CTRL_TRS = :: रजिस्टर वॉन्दे संदेश (_T ("BT_UARTCTRL_TRANSFER")); :: प्रेषित संदेश (एचडब्ल्यूएफआरएफआरएडीसीएटीटी, यूडब्ल्यूएम_यूएपीसीआरआरएलआरआरएस, 1, 0); पहले से धन्यवाद बहुत सीधे आगे होना चाहिए। आपको PInvoke परिभाषाओं को उस श्रेणी के अंदर सार्वजनिक में बदलने की आवश्यकता होगी: सार्वजनिक वर्ग Win32Api {[DllImport ("user32.dll", चारसेट = Charset.Unicode, SetLastError = true)] सार्वजनिक स्थिर एक्सटर्न्स यूआई रजिस्ट...

How to log into port 80 to enter credentials via a webbrowser control in c#? -

I have to use a webbrover control, which must be entered in the router's html page. I want to login it but bypass the log in the pop up screen. Please suggest to me how I can get it through the control of webbreeze on Windows Forms. EDIT: This is that I can see in the source page after that credentials are not sure that it helps. if (F.now_proto.value == "pppoe" || Foone_proto.value == "PPTP" || FoOn_ProPo.value == "L2tp" || F. Nova_proti.valui = = "Heart beat") {if (F.ppp_username.value == "") {// alert ("You need user name input!"); Warning (errmsg.err0); F.ppp_username.focus (); return false; } If (F.ppp_passwd.value == "") {// Warning ("You must input password!"); Warning (errmsg.err6); F.ppp_passwd.focus (); return false; } Update: solution webBrowser1.Navigate (http: // username: password@192.168.1.1) does this You can manipulate the browser to fill out the form and click su...

shell - <<END_SCRIPT while connecting to FTP via bash -

I have never written a shell script and am trying to understand this part of the code: ftp -n $ HOST & lt; & Lt; END_SCRIPT USER $ citation quote PASS $ PASSWD $ FILE Exit END_SCRIPT Exits 0 & lt; & Lt; What does the END_SCRIPT sign? And what is the quote call doing? Thanks in advance, again I have a super new & lt; & Lt; in the bish for FTP command

c++ - Efficiency of std::copy vs memcpy -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब दक्षता कितना गंभीर है memcpy और std :: copy का उपयोग करने के बीच मेरे पास एक ऐसी स्थिति है जहां मेरे सिस्टम पर सदिश कार्यान्वयन परिसीमित स्मृति का उपयोग नहीं करता है, जो कि मुझे :: मेकपीपी (डिस्ट, और वीक [0], आकार) करने के बजाय इसकी सामग्री की प्रतिलिपि बनाना है; मुझे यकीन नहीं है कि यह कितनी बुरी तरह से दक्षता को प्रभावित करने की संभावना है। एक उचित सभ्य कार्यान्वयन होगा यदि आपका कार्यान्वयन करता है तो कोड> std :: copy कॉल के लिए संकलित करें memmove उन स्थितियों में जहां यह संभव है (अर्थात तत्व प्रकार एक पीओडी है)। संगत भंडारण नहीं है (सी + 03 03 मानक की आवश्यकता है), memmove से std :: copy की तुलना में तेज़ हो सकता है, लेकिन शायद बहुत ज्यादा नहीं। मैं केवल तब ही चिंता करना शुरू कर दूँगा जब आपके पास मापने के लिए माप होना वास्तव में एक मुद्दा है।

php - How to limit the number of cells per table row to 3? -

I have a dynamically loaded table, in which I want to limit the number of columns by 3 so that the next TD Stars (see and view the categories button at the top of the page). Here's how I import data using smartphones: How can I make it so that there are only 3 table cells in each row? foreach Use the property of the loop: ... {foreach = $ array_categories items = v name = cat} {if $ Smarty.foreach.cat.iteration% 3 == 0 & amp; Amp; $ Smarty.foreach.cat.iteration & gt; 0} & lt; / Tr & gt; & Lt; TR & gt; {/ If} & lt; Td valign = "top" width = "116px" align = "left" & gt; Smarty2 syntax, if you use Smarty3 you can also use $ v @ iteration $ smarty.foreach.cat Iteration code>.

LINQ to SQL calling stored procedure that uses dynamic SQL -

I am trying to connect to the SQL stored procedure using LINQ. It works very well for stored procedures that have static SQL queries. I want to connect to a stored procedure that has dynamic SQL I It has a exec statement at the end of the stored procedure. exec (@srchQuery) When I do this it does not work because it is dynamic SQL If I print @srchQuery and copies that stored procedure and uses that static SQL in the stored procedure, so this is not a problem. Analyze the SQL Direct SELECT statement from LINQ to project it as the result of executing it The type of model for which is the stored procedure. Because you are using a dynamic statement using EXEC , it can not determine which type of model has been generated. The simple answer will not be to use a stored procedure, and instead use SQL to generate SQL from LINQ, or use a dynamic built content within your stored procedure. You are creating the SQL statement, it should mean that you have a strong cas...

wpf - Navigate from MainView to another View -

I am new to WPF and I use the WPF Model-View-View Model Toolkit 0.1 I'm doing my hand at the WPF I have a very simple question but I can not get my head around it. How do I show a new view from the menu item on the main scene? My code looks like this: MainView.xaml & lt; Menu dockpanel.doc = "top" & gt; & Lt; MenuItem header = "_file" & gt; & Lt; MenuItem command = "{binding newpage}" header = "new page" inputstarter = "Ctrl-N" /> & Lt; / MenuItem & gt; & Lt; / Menu & gt; Main viewModel. Cs Private Delayed Commands Newpage Commands; Public ICD Newspage {get {if (newPageCommand == blank) {newPageCommand = new representative command (GoToNewPage); } Back new page commm; }} Private Zero GoToNewPage () {??? } What do I write in GoToNewPage to display the new page .gaml? Usually your application is fully run in view modals, Used to interact with ViewModels in a friendl...

jquery - Can you animate a gradient on hover? -

Trying to find out if you can resurrect a gradient on UL Light A: Hover ?? I have the jQuery color animation plug installed and deployed, but I can not understand what I am doing: JS: & lt; Script language = "javascript" type = "text / javascript" & gt; $ (Document) .ready (function () {var iAniSpeed ​​= 2000; var sBgColor = 'gold'; $ ('# headerwrap'). Hover (function () {$ ('li a: hover'). Animate ({Background color: sBgColor}, iAniSpeed); return false;});}); & Lt; / Script & gt; html: & lt; Header & gt; & Lt; Div id = "headerwrap" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Academy Information & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Transit video & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt;...

jquery - JavaScript in CakePHP's controller -

In my cake php view, I call the method in jQuery using jQuery in the controller: function placeSensors (Nk) {$ .ajax ({type: 'post', url: '/ myapp / maps / placeSensors /' + nk, success: function (r) {if (r.status = 'ok ') {}}}); } JS in the controller ie Defined with: Class MapsController Extended AppController {var $ name = 'Maps'; Var $ assistants = array ('js'); Var uses $ = array ('Measurings', 'Maps'); Var $ components = array ('RequestHandler'); // Added later, but still the same function index ($ id = null, $ value = null) {$ code = ''; ? & Gt; & Lt; Script type = "text / javascript" & gt; Warning ('hello!'); & Lt; / Script & gt; & Lt ;? Php return $ code; } So, with simple code, I can not get the warning message on my web form, the very simple code I was using in another project and it works there, and For some reason it does not work on this ... ...

java - Could JAXB use the base type for a known element with an unknown type? -

इस तरह एक XSD को देखते हुए: & lt;! - ... - - & gt; & Lt; xsd: तत्व का नाम = "माइएलेमेंट" प्रकार = "पेरेन्टटाइप" / & gt; & Lt;! - ... - & gt; & Lt; xsd: जटिल टाइप करें नाम = "पेरेंट टाइप" & gt; & LT; XSD: अनुक्रम & gt; & Lt;! - ... - & gt; & Lt; / XSD: अनुक्रम & gt; & Lt; / XSD: complexType & gt; & Lt; xsd: जटिल टाइप नाम = "चाइल्डटाइप 1" & gt; & LT; XSD: complexContent & gt; & Lt; xsd: extension base = "ParentType" & gt; & LT; XSD: अनुक्रम & gt; & Lt;! - ... - & gt; & Lt; / XSD: अनुक्रम & gt; & Lt; / XSD: विस्तार & gt; & Lt; / XSD: complexContent & gt; & Lt; / XSD: complexType & gt; & Lt;! - ... - & gt; JAXB2 को बेस-टाइप पेन्टटाइप पर गिरने के लिए कॉन्फ़िगर किया जा सकता है, जब उसे किसी अज्ञात प्रकार के एक तत्व में एक्सएमआर को जोड़ना पड़ता है, जैसे कि अगले उदाहरण में: & lt;! - ... ...

How to create a dialog using jquery-ui without html div specified -

Using jquery-ui to make a dialog is very easy: Lt; Script & gt; $ (Function () {$ ("#dialog") .dialog ();}); & Lt; / Script & gt; & Lt; Div id = "dialog" title = "basic dialog" & gt; & Lt; P & gt; This is the default dialog that is useful for displaying information. The dialog window can be moved, resized and closed with the 'X' icon. & Lt; / P & gt; & Lt; / Div & gt; ... but one still needs a div in HTML so that it can work in Dojo: var dlg = new dijit Dialog ({title: "dialog", style: "width: 30%; height: 300px;"}); Dlg.show (); Can do the trick only without specifying in the HTML section, can jquery-ui do this? (I want to use jquery-ui here) Thanks, David While I'm not sure why you do not want to open a dialogue with any content, you can easily create a new one on the fly and open the jquery dialogue against it: $ ( " Greetings .") Dialog (); ...