Search Results

Search found 244 results on 10 pages for 'pa'.

Page 4/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to handle URLs with diacritic characters

    - by user359650
    I am wondering how to handle URLs which correspond to strings containing diacritic (á, u, ´...). I believe what we're seeing mostly are URLs where diacritic characters where converted to their closest ASCII equivalent, for instance Rånades på Skyttis i Ö-vik converted to ranades-pa-skyttis-i-o-vik. However depending on the corresponding language, such conversion might be incorrect. For instance in German, ü should be converted to ue and not just u, as seen with the below URL representing the Bayern München string as bayern-muenchen: http://www.bundesliga.de/en/liga/clubs/fc-bayern-muenchen/index.php However what I've also noticed, is that browsers can render non-ASCII characters when they are percent-encoded in the URL, which is the approach Wikipedia has chosen, for instance http://de.wikipedia.org/wiki/FC_Bayern_M%C3%BCnchen which is rendered as: Therefore I'm considering the following approach for creating URL slugs: -(1) convert strings while replacing non-ASCII characters to their recommended ASCII representation: Bayern München - bayern-muenchen -(2) also convert strings to percent encoding: Bayern München - bayern_m%C3%BCnchen -create a 301 redirect from version (1) to version (2) Version (1) URLs could be used for marketing purposes (e.g. mywebsite.com/bayern-muenchen) but the URLs that would end being displayed in the browser bar would be version (2) URLs (e.g. mywebsite.com/bayern-münchen). Can you foresee particular problems with this approach? (Wikipedia is not doing it and I wonder why, apart from the fact that they don't need to market their URLs)

    Read the article

  • PHP Ajax not working

    - by Kostis
    I have 3 buttons on my page and depending on which one the user is clickingi want to run through ajax call a delete query in my database. When the user clicks on a button the javascript function seems to work but it doesn't run the query in php script. The html page: <?php session_start(); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7"> <script> function myFunction(name) { var r=confirm("Are you sure? This action cannot be undone!"); if (r==true) { alert(name); // check if is getting in if statement and confirm the parameter's value var xmlhttp; if (str.length==0) { document.getElementById("clearMessage").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("clearMessage").innerHTML= responseText; } } xmlhttp.open("GET","clearDatabase.php?q="+name,true); xmlhttp.send(); } else alert('pff'); } </script> </head> <body> <div id="wrapper"> <div id="header"></div> <div id="main"> <?php if (session_is_registered("username")){ ?> <!--<a href="#">???a????s? pa?a??? µ???µ?t??</a><br /> <a href="#">???a????s? pa?a??? s??ed????</a><br /> <a href="#">???a????s? push notifications</a><br />--> <input type="button" value="???a????s? pa?a??? µ???µ?t??" onclick="myFunction('messages')" /> <input type="button" value="???a????s? pa?a??? s??ed????" onclick="myFunction('conferences')" /> <input type="button" value="???a????s? push notifications" onclick="myFunction('notifications')" /> <div id="clearMessage"></div> <?php } else echo "Login first."; ?> </div> <div id="footer"></div> </div> </body> </html> and the php script: <?php if (isset($_GET["q"])) $q=$_GET["q"]; $host = "localhost"; $database = "dbname"; $user = "dbuser"; $pass = "dbpass"; $con = mysql_connect($host,$user,$pass) or die(mysql_error()); mysql_select_db($database,$con) or die(mysql_error()); if ($q=="messages") $query = "DELETE FROM push_message WHERE time_sent IS NOT NULL"; else if ($q=="conferences") $query = "DELETE FROM push_message WHERE time_sent IS NOT NULL"; else if ($q=="notifications") { $query = "DELETE FROM push_friend WHERE time_sent IS NOT NULL"; } $res = mysql_query($query,$con) or die(mysql_error()); if ($res) echo "success"; else echo "failed"; mysql_close($con); ?>

    Read the article

  • Fusion Middleware 11gR1 : 3??????

    - by Hiroyuki Yoshino
    2011?3? (2011/03/08 ??)?Fusion Middleware 11gR1 ?????????????? ?????????????3??????? 1. Oracle iPlanet Web Proxy Server Oracle iPlanet Web Proxy Server???????4.0.14????4.0.15????????? ???????Release Notes (??) ?????????? ?????????????????????? Platforms: AIX, HP-UX Itanium, HP-UX PA-RISC, Linux x86, Linux x86-64, Microsoft Windows (32-bit), Microsoft Windows x64, Solaris (SPARC), Other Platforms 2. Oracle Security Governer Integration Kit ???????????? Oracle Security Governor??Healthcare??????????????????????????????????????????????????????????? ?????????????????????? Platforms: AIX, HP-UX Itanium, HP-UX PA-RISC, Linux x86, Linux x86-64, Microsoft Windows (32-bit), Microsoft Windows x64, Solaris (SPARC) 3. Oracle Tuxedo Oracle Tuxedo????????????????? Oracle Tuxedo System and Application Monitor (TSAM)????(11.1.1.2.0??11.1.1.2.1)????? Oracle Tuxedo JCA Adapter????(11.1.1.2.0??11.1.1.2.1)????? Oracle Service Architecture Leveraging Tuxedo (SALT)????(11.1.1.1.0??11.1.1.2.0)????? ???????????Oracle Tuxedo Application Runtime for CICS and Batch???Oracle Tuxedo Application Rehosting Workbench? ???????????????? CICS????????????????Oracle Tuxedo???????·??????????????·?????????????????COBOL????????????????JCL??????·????????????????????????????????????CICS?????????????????????????????????? ??????????? (??)?????????? ???Oracle Tuxedo?????????????????????????? Platforms: AIX, HP-UX Itanium, Linux x86, Linux x86-64, Microsoft Windows (32-bit), Microsoft Windows x64, Solaris (SPARC), Other Platforms ???????????????

    Read the article

  • How to synchronize cuda threads when they are in the same loop and we need to synchronize them to ex

    - by Vickey
    Hi all, I have written a code and Now I want to implement this on cuda GPU but I'm new to synchronization so please help me with this, It's little urgent to me. Below I'm presenting the code and I want to that LOOP1 to be executed by all threads (heance I want to this portion to take advantage of cuda and the remaining portion (the portion other from the LOOP1) is to be executed by only a single thread. do{ point_set = master_Q[(*num_mas) - 1].q; List* temp = point_set; List* pa = point_set; if(master_Q[num_mas[0] - 1].max) max_level = (int) (ceilf(il2 * log(master_Q[num_mas[0] - 1].max))); *num_mas = (*num_mas) - 1; while(point_set){ List* insert_ele = temp; while(temp){ insert_ele = temp; if((insert_ele->dist[insert_ele->dist_index-1] <= pow(2, max_level-1)) || (top_level == max_level)){ if(point_set == temp){ point_set = temp->next; pa = temp->next; } else{ pa->next = temp->next; } temp = NULL; List* new_point_set = point_set; float maximum_dist = 0; if(parent->p_index != insert_ele->point_index){ List* tmp = new_point_set; float *b = &(data[(insert_ele->point_index)*point_len]); **LOOP 1:** while(tmp){ float *c = &(data[(tmp->point_index)*point_len]); float sum = 0.; for(int j = 0; j < point_len; j+=2){ float d1 = b[j] - c[j]; float d2 = b[j+1] - c[j+1]; d1 *= d1; d2 *= d2; sum = sum + d1 + d2; } tmp->dist[tmp->dist_index] = sqrt(sum); if(maximum_dist < tmp->dist[tmp->dist_index]) maximum_dist = tmp->dist[tmp->dist_index]; tmp->dist_index = tmp->dist_index+1; tmp = tmp->next; } max_distance = maximum_dist; } while(new_point_set || insert_ele){ List* far, *par, *tmp, *tmp_new; far = NULL; tmp = new_point_set; tmp_new = NULL; float level_dist = pow(2, max_level-1); float maxdist = 0, maxp = 0; while(tmp){ if(tmp->dist[(tmp->dist_index)-1] > level_dist){ if(maxdist < tmp->dist[tmp->dist_index-1]) maxdist = tmp->dist[tmp->dist_index-1]; if(tmp == new_point_set){ new_point_set = tmp->next; par = tmp->next; } else{ par->next = tmp->next; } if(far == NULL){ far = tmp; tmp_new = far; } else{ tmp_new->next = tmp; tmp_new = tmp; } if(parent->p_index != insert_ele->point_index) tmp->dist_index = tmp->dist_index - 1; tmp = tmp->next; tmp_new->next = NULL; } else{ par = tmp; if(maxp < tmp->dist[(tmp->dist_index)-1]) maxp = tmp->dist[(tmp->dist_index)-1]; tmp = tmp->next; } } if(0 == maxp){ tmp = new_point_set; aloc_mem[*tree_index].p_index = insert_ele->point_index; aloc_mem[*tree_index].no_child = 0; aloc_mem[*tree_index].level = max_level--; parent->children_index[parent->no_child++] = *tree_index; parent = &(aloc_mem[*tree_index]); tree_index[0] = tree_index[0]+1; while(tmp){ aloc_mem[*tree_index].p_index = tmp->point_index; aloc_mem[(*tree_index)].no_child = 0; aloc_mem[(*tree_index)].level = master_Q[(*cur_count_Q)-1].level; parent->children_index[parent->no_child] = *tree_index; parent->no_child = parent->no_child + 1; (*tree_index)++; tmp = tmp->next; } cur_count_Q[0] = cur_count_Q[0]-1; new_point_set = NULL; } master_Q[*num_mas].q = far; master_Q[*num_mas].parent = parent; master_Q[*num_mas].valid = true; master_Q[*num_mas].max = maxdist; master_Q[*num_mas].level = max_level; num_mas[0] = num_mas[0]+1; if(0 != maxp){ aloc_mem[*tree_index].p_index = insert_ele->point_index; aloc_mem[*tree_index].no_child = 0; aloc_mem[*tree_index].level = max_level; parent->children_index[parent->no_child++] = *tree_index; parent = &(aloc_mem[*tree_index]); tree_index[0] = tree_index[0]+1; if(maxp){ int new_level = ((int) (ceilf(il2 * log(maxp)))) +1; if (new_level < (max_level-1)) max_level = new_level; else max_level--; } else max_level--; } if( 0 == maxp ) insert_ele = NULL; } } else{ if(NULL == temp->next){ master_Q[*num_mas].q = point_set; master_Q[*num_mas].parent = parent; master_Q[*num_mas].valid = true; master_Q[*num_mas].level = max_level; num_mas[0] = num_mas[0]+1; } pa = temp; temp = temp->next; } } if((*num_mas) > 1){ List *temp2 = master_Q[(*num_mas)-1].q; while(temp2){ List* temp3 = master_Q[(*num_mas)-2].q; master_Q[(*num_mas)-2].q = temp2; if((master_Q[(*num_mas)-1].parent)->p_index != (master_Q[(*num_mas)-2].parent)->p_index){ temp2->dist_index = temp2->dist_index - 1; } temp2 = temp2->next; master_Q[(*num_mas)-2].q->next = temp3; } num_mas[0] = num_mas[0]-1; } point_set = master_Q[(*num_mas)-1].q; temp = point_set; pa = point_set; parent = master_Q[(*num_mas)-1].parent; max_level = master_Q[(*num_mas)-1].level; if(master_Q[(*num_mas)-1].max) if( max_level > ((int) (ceilf(il2 * log(master_Q[(*num_mas)-1].max)))) +1) max_level = ((int) (ceilf(il2 * log(master_Q[(*num_mas)-1].max)))) +1; num_mas[0] = num_mas[0]-1; } }while(*num_mas > 0);

    Read the article

  • Hierarchy based aggregation

    - by Ganapathy Subramaniam
    I have a hierarchy table in SQL Server 2005 which contains employees - managers - department - location - state. Sample table for hierarchy table: ID Name ParentID Type 1 PA NULL 0 (group) 2 Pittsburgh 1 1 (subgroup) 3 Accounts 2 1 4 Alex 3 2 (employee) 5 Robin 3 2 6 HR 2 1 7 Robert 6 2 Second one is fact table which contains employee salary details ID and Salary. Sample data for fact table: ID Salary 4 6000 5 5000 7 4000 Is there any good to way to display the hierarchy from hierarchy table with aggregated sum of salary based on employees. Expected result is like Name Salary PA 15000 (Pittsburgh + others(if any)) Pittusburgh 15000 (Accounts + HR) Accounts 11000 (Alex + Robin) Alex 6000 (direct values) Robin 5000 HR 4000 Robert 4000 In my production environment, hierarchy table may contain 23000+ rows and fact table may contain 300,000+ rows. So, I thought of providing any level of groupid to the query to retrieve just its children and its corresponding aggregated value. Any better solution?

    Read the article

  • NullPointerException when trying to connect to web service using kSoap method Android

    - by benjamin schultz
    My web service should be returning an integer, but every time i run the code i get the NullPointerException error. Any ideas or help would be very appreciated Here's my code: public class CGCountTest extends Activity { TextView testTV; private static final String NAMESPACE = "http://passport-america.com/webservices/"; private static final String URL = "http://localhost:11746/Service1.asmx"; private static final String SOAP_ACTION = "http://www.passport-america.com/webservices/getCGCount"; private static final String METHOD_NAME = "getCGCount"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soap_test); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer result = (Integer)envelope.getResponse(); TextView testTV = (TextView)findViewById(R.id.testTV); result.toString(); testTV.setText(result); } catch(Exception e) { testTV.setText(e.getMessage()); } } here's the logcat 06-02 15:13:36.557: WARN/dalvikvm(326): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) 06-02 15:13:36.557: ERROR/AndroidRuntime(326): Uncaught handler: thread main exiting due to uncaught exception 06-02 15:13:36.876: ERROR/AndroidRuntime(326): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pa.passammain/com.pa.passammain.CGCountTest}: java.lang.NullPointerException 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.os.Handler.dispatchMessage(Handler.java:99) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.os.Looper.loop(Looper.java:123) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.main(ActivityThread.java:4203) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at java.lang.reflect.Method.invokeNative(Native Method) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at java.lang.reflect.Method.invoke(Method.java:521) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at dalvik.system.NativeStart.main(Native Method) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): Caused by: java.lang.NullPointerException 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.pa.passammain.CGCountTest.onCreate(CGCountTest.java:46) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): ... 11 more i think my url string may be the problem, but i've tried using my ip with no luck

    Read the article

  • Why is my javascript function sometimes "not defined"?

    - by harpo
    Problem: I call my javascript function, and sometimes I get the error 'myFunction is not defined'. But it is defined. For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=0; i < pa.length; i++) la.push( pa[i] ); return la; } Function.prototype.bind = function( po ) { var __method = this; var __args = []; // sometimes errors -- in practice I inline the function as a workaround __args = copyArray( arguments ); return function() { /* bind logic omitted for brevity */ } } As you can see, copyArray is defined right there, so this can't be about the order in which script files load. I've been getting this in situations that are harder to work around, where the calling function is located in another file that should be loaded after the called function. But this was the simplest case I could present, and appears to be the same problem. It doesn't happen 100% of the time, so I do suspect some kind of load-timing-related problem. But I have no idea what. @Hojou: That's part of the problem. The function in which I'm now getting this error is itself my addLoadEvent, which is basically a standard version of the common library function. @James: I understand that, and there is no syntax error in the function. When that is the case, the syntax error is reported as well. In this case, I am getting only the 'not defined' error. @David: The script in this case resides in an external file that is referenced using the normal <script src="file.js"></script> method in the page's head section. @Douglas: Interesting idea, but if this were the case, how could we ever call a user-defined function with confidence? In any event, I tried this and it didn't work. @sk: This technique has been tested across browsers and is basically copied from the prototype library.

    Read the article

  • process taking high time on Itanium server

    - by Vishwa
    Hi, we have an application which is recently migrated from PA-Risk server to itanium server. After migration we noticed that there is significant increase in time taken to complete a process. when we tracked the time taken by each part we found that the system time is 7.590000, user time is 3.990000 but elapsed time is 70.434882!! Due to this huge elapsed time, overall performance of the application has gone very low. i wrote a small progrms to perform I/O operations on Itanium. these scripts working faster on Itanium compared to PA-Risk. what could be the reason for this high elapsed time of this process?

    Read the article

  • Is this type of calculation to be put in Model or Controller?

    - by Hadi
    i have Product and SalesOrder model (to simplify, 1 sales_order only for 1 product) Product has_many SalesOrder SalesOrder belongs_to Product pa = Product A #2000 so1 = SalesOrder 1 order product A #1000, date:yesterday so2 = SalesOrder 2 order product A #999, date:yesterday so3 = SalesOrder 3 order product A #1000, date:now Based on the date, pa.find_sales_orders_that_can_be_delivered will give: SalesOrder 1 order product A #1000, date:yesterday SalesOrder 2 order product A #999, date:yesterday SalesOrder 3 order product A #1, date:now <-- the newest The question is: is find_sales_orders_that_can_be_delivered should be in the Model? i can do it in controller. and the general question is: what goes in Model and what goes in Controller. Thank you

    Read the article

  • Advanced SQL query with lots of joins

    - by lund.mikkel
    Hey fellow programmers Okay, first let me say that this is a hard one. I know the presentation may be a little long. But I how you'll bare with me and help me through anyway :D So I'm developing on an advanced search for bicycles. I've got a lot of tables I need to join to find all, let's say, red and brown bikes. One bike may come in more then one color! I've made this query for now: SELECT DISTINCT p.products_id, #simple product id products_name, #product name products_attributes_id, #color id pov.products_options_values_name #color name FROM products p LEFT JOIN products_description pd ON p.products_id = pd.products_id INNER JOIN products_attributes pa ON pa.products_id = p.products_id LEFT JOIN products_options_values pov ON pov.products_options_values_id = pa.options_values_id LEFT JOIN products_options_search pos ON pov.products_options_values_id = pos.products_options_values_id WHERE pos.products_options_search_id = 4 #code for red OR pos.products_options_search_id = 5 #code for brown My first concern is the many joins. The Products table mainly holds product id and it's image and the Products Description table holds more descriptive info such as name (and product ID of course). I then have the Products Options Values table which holds all the colors and their IDs. Products Options Search is containing the color IDs along with a color group ID (products_options_search_id). Red has the color group code 4 (brown is 5). The products and colors have a many-to-many relationship managed inside Products Attributes. So my question is first of all: Is it okay to make so many joins? Is i hurting the performance? Second: If a bike comes in both red and brown, it'll show up twice even though I use SELECT DISTINCT. Think this is because of the INNER JOIN. Is this possible to avoid and do I have to remove the doubles in my PHP code? Third: Bikes can be double colored (i.e. black and blue). This means that there are two rows for that bike. One where it says the color is black and one where is says its blue. (See second question). But if I replace the OR in the WHERE clause it removes both rows, because none of them fulfill the conditions - only the product. What is the workaround for that? I really hope you will and can help me. I'm a little desperate right now :D Regards Mikkel Lund

    Read the article

  • c++ compile error

    - by Niranjan
    Hi, I am trying to develop abstract design pattern code for one of my project as below.. But, I am not able to compile the code ..giving some compile errors(like "conversion from 'ProductA1 *' to 'ProductA *' exists, but is inaccessible" ).. Can any one please help me out in this... #include "stdafx.h" #include <iostream> using namespace std; class ProductA { public: virtual void Operation1()=0; virtual void Operation2()=0; }; class ProductA1 : ProductA { public: virtual void Operation1() {cout<<"PD ProductA1 Operation1"<<endl; } virtual void Operation2() {cout<<"PD ProductA1 Operation2"<<endl; } }; class ProductA2 : ProductA { public: virtual void Operation1() {cout<<"DT ProductA2 Operation1"<<endl; } virtual void Operation2() {cout<<"DT ProductA2 Operation2"<<endl; } }; //------------------------------------------------------------- class ProductB { public: virtual void Operation3()=0; virtual void Operation4()=0; }; class ProductB1 : ProductB { public: void Operation3() { cout<<"PD ProductB1 Operation3"<<endl; } void Operation4() { cout<<"PD ProductB1 Operation4"<<endl; } }; class ProductB2 : ProductB { public: void Operation3() { cout<<"DT ProductB2 Operation3"<<endl; } void Operation4() { cout<<"DT ProductB2 Operation4"<<endl; } }; //--------------- abstrct factory --------------------------- class Factory { public: virtual ProductA* CreateA () =0; virtual ProductB* CreateB ()=0; }; class Factory1 : Factory { public: ProductA* CreateA () { return new ProductA1(); } ProductB* CreateB () { return new ProductB1(); } }; class Factory2 : Factory { public: ProductA* CreateA () { return new ProductA2(); } ProductB* CreateB () { return new ProductB2(); } }; //--------------------- client -------------------------------- int _tmain(int argc, _TCHAR* argv[]) { Factory* pf = new Factory1(); ProductA *pa = pf->CreateA(); pa->Operation1(); pa->Operation2(); ProductB *pb = pf->CreateB(); pb->Operation3(); pb->Operation4(); return 0; }

    Read the article

  • html source does not show all visible data

    - by every_answer_gets_a_point
    if you go here: http://whois.domaintools.com/iconplc.com and view the source why can't you see the registrant data in the HTML source? is it at all possible to get this data through the html source? this stuff is not in the html source: Registrant: ICON Clinical Research 212 Church Road North Wales, PA 19454 US Domain Name: ICONPLC.COM Administrative Contact, Technical Contact: ICON Clinical Research 212 Church Road North Wales, PA 19454 US 215-616-3359 fax: 123 123 1234 Record expires on 08-Sep-2019. Record created on 12-Dec-2007. Domain servers in listed order: UDNS1.ULTRADNS.NET UDNS2.ULTRADNS.NET

    Read the article

  • I want to make a 2D color plot showing stress magnitude (S) at very loctaion (x, y) based on continuous color change using limited data sets

    - by Alex Liu
    friends, I have to trouble you as I couldn't find a solution after trying for a long time. I have 3 columns of data. x, y, and the stress value (S) at every point (x, y). I want to generate a 2D color plot displaying continuous color change with the magnitude of the stress (S). The stress values increase from -3*10^4 Pa to 4*10^4 Pa. I only have hundreds of data sets for an area, but I want to see the stress magnitude (read from the color) at every location (x, y). What Matlab command should I use? Thank you very much! I want to make a 2D color plot showing stress magnitude (S) at very loctaion (x, y) based on continuous color change using limited

    Read the article

  • Dynamic memory allocation with default values

    - by viswanathan
    class A { private: int m_nValue; public: A() { m_nValue = 0; } A(int nValue) { m_nValue = nValue); ~A() {} } Now in main if i call A a(2);// 2 will be assigned for m_nValue of object A. Now how do we do this if i want to define an array of objects. Also how do we do this if i dynamically create objects using operator new like A *pA; pA = new A[5];// while creating the object i want the parameterised constructor to be //called I hope the question is clear. Do let me know if more explanation is needed

    Read the article

  • How to deal with 2 almost identical tables

    - by jgritty
    I have a table of baseball stats, something like this: CREATE TABLE batting_stats( ab INTEGER, pa INTEGER, r INTEGER, h INTEGER, hr INTEGER, rbi INTEGER, playerID INTEGER, FOREIGN KEY(playerID) REFERENCES player(playerID) ); But then I have a table of stats that are basically exactly the same, but for a team: CREATE TABLE team_batting_stats( ab INTEGER, pa INTEGER, r INTEGER, h INTEGER, hr INTEGER, rbi INTEGER, teamID INTEGER, FOREIGN KEY(teamID) REFERENCES team(teamID) ); My first instinct is to scrap the Foreign key and generalize the ID, but I still have a problem, I have these 2 tables, and they can't have overlapping IDs: CREATE TABLE player( playerID INTEGER PRIMARY KEY, firstname TEXT, lastname TEXT, number INTEGER, teamID INTEGER, FOREIGN KEY(teamID) REFERENCES team(teamID) ); CREATE TABLE team( teamID INTEGER PRIMARY KEY, name TEXT, city TEXT, ); I feel like I'm overlooking something obvious that could solve this problem and reduce stats to a single table.

    Read the article

  • OBIEE 11.1.1 - How to configure HTTP compression / caching on Oracle BI Mobile app

    - by Ahmed Awan
     Applies to: OBIEE 11.1.1.5 Supported Physical Devices and OS: The Oracle BI Mobile application with HTTP compression / caching configurations is tested on following devices: iPhone 4S, 4, 3GS. iPad 2 and 1. Note these devices must be running the latest version of the iOS version, i.e. iOS 4.2.1 / iOS 5 is also supported. Configuring Pre-requisites: Prior to configuration, the Oracle Web tier software must be installed on server, as described in product documentation i.e. Enterprise Deployment Guide for Oracle Business Intelligence in Section 3.2, "Installing Oracle HTTP Server." The steps for configuring the compression and caching on Oracle HTTP Server are described in this PA blog at http://blogs.oracle.com/pa/entry/obiee_11g_user_interface_ui and in support Doc ID 1312299.1. Configuration Steps in Oracle BI Mobile application: 1. Download the BI Mobile app from the Apple iTunes App Store. The link is http://itunes.apple.com/us/app/oracle-business-intelligence/id434559909?mt=8 . 2. Add Server for example http://pew801.us.oracle.com:7777/analytics/ , here is how your “Server Setting” screen should look like on your OBI Mobile app:                                 Performance Gain Test (using Oracle® HTTP Server with OBIEE) The test with/without HTTP compression / caching was conducted on iPhone 4S / iPad 2 to measure the throughput (i.e. total bytes received) for Oracle® Business Intelligence Enterprise Edition. Below table shows the throughput comparison before and after using HTTP compression / caching for SampleApp using “QuickStart” dashboard accessing reports i.e. Overview, Details, Published Reporting and Scorecard. Testing shows that total bytes received were reduced from 2.3 MB to 723 KB. a. Test Results > Without HTTP Compression / Caching setting - Total Throughput (in Bytes) captured below: Total Bytes Statistics:        b. Test Results > With HTTP Compression / Caching settings - Total Throughput (in Bytes) captured below: Total Bytes Statistics:      

    Read the article

  • float right image pushes down text in table below in IE9 [migrated]

    - by Cheers and hth. - Alf
    I'm not a webmaster, not even a web developer, but I'm tasked with adding content to a Wordpress site developed by Someone Else(TM). Here's a page illustrating the problem: http://www.reginedagan.no/program/fiskekonkurranse-i-hovden/. It shows up nice in Firefox: But in IE9 the floated picture pushed down the text in the table below, so that it looks rather awful: I found some related questions on the web, e.g. "CSS: Float right in IE doesn't work!" and "why does a floating DIV mess up table positioning?", and the suggestions there led me to set clear: none on the div around the table, the table itself, and then each individual tr and finally even on each individual td. I also set width="99%" on the table, and tried (but I don't know how correctly) to apply the IE6 quirk fix margin-right: -3px. So here's the content as written in Wordpress, including the unsuccessful attempted fixes: <h1><div style="float: right"><a href="http://www.reginedagan.no/?attachment_id=671"><img src="http://www.reginedagan.no/wp-content/uploads/2012/06/fiskekonkurranse-2011-bilde-3-nedskalert.jpg" alt="Fra fiskekonkurransen i 2011" title="Fra fiskekonkurransen i 2011" width="200" height="242" class="size-full wp-image-671"/></a></div>Fiskekonkurranse i Hovden!</h1> <div style="background-color: #FAF0F0; clear: none;"><table width="99%" style="clear: none; right-margin: -3px;"> <tr style=" clear: none;"> <td style="text-align: left; clear: none;">Dato:</td> <td style="text-align: left; clear: none;">Lørdag 21.juli</td> </tr> <tr style=" clear: none;"> <td style="text-align: left; padding-left: 2em"; clear: none;>/ barn, Flytebrygga</td> <td style="text-align: left; clear: none;">15.00 &ndash; 16.00</td> </tr> <tr style=" clear: none;"> <td style="text-align: left; padding-left: 2em; clear: none;">/ voksne (over 12 år), Moloen</td> <td style="text-align: left; clear: none;">15.00 &ndash; 17.00 </td> </tr> <tr style=" clear: none;"> <td style="text-align: left; clear: none;">Sted:</td> <td style="text-align: left; clear: none;">Hovden</td> </tr> <tr style=" clear: none;"> <td style="text-align: left; clear: none;">Pris:</td> <td style="text-align: left; clear: none;">voksen (over 12 år) kr. 50,-, barn kr. 30,-</td> </tr style=" clear: none;"> <tr> <td style="text-align: left; clear: none;">Arrangør:</td> <td style="text-align: left; clear: none;">Hovden Grendelag</td> </tr> </table></div> Velkommen til den årlige Fiskekonkurransen i Hovden lørdag 21. juli! <a href="http://www.reginedagan.no/program/fiskekonkurranse-i-hovden/fiskekonkurranse-2011-bilde-nedskalertjpg/" rel="attachment wp-att-672"><img src="http://www.reginedagan.no/wp-content/uploads/2012/03/fiskekonkurranse-2011-bilde-nedskalertjpg.jpg" alt="Fra fiskekonkurransen i 2011" title="Fra fiskekonkurransen i 2011" width="400" height="267" class="alignleft size-full wp-image-672" /></a>Det blir stangfiske fra moloen og egen barnekonkurranse fra flytebrygga. Premiering for størst fisk, størst antall kg og flest antall stk. Premiering for barn kl. 16:30 på moloen. Alle premieres. Premiering for voksne på festen om kvelden. Salg av pølser og brus, vafler og kaffe, samt sluker. <div style="clear: left; border: 1px dashed gray; padding: 1em;"> Fest på Hovden samfunnshus kl. 21 &ndash; 02. Musikk: «Mister West», Steinar Aarsnes, Andøya. CC. Salg av øl/vin og snacks. </div> VEL MØTT &mdash; SKITT FISKE! And the resulting HTML served to a browser (only the relevant first part): <div style="float: right;"><a href="http://www.reginedagan.no/?attachment_id=671"><img src="http://www.reginedagan.no/wp-content/uploads/2012/06/fiskekonkurranse-2011-bilde-3-nedskalert.jpg" alt="Fra fiskekonkurransen i 2011" title="Fra fiskekonkurransen i 2011" class="size-full wp-image-671" height="242" width="200"></a></div> <p>Fiskekonkurranse i Hovden!</p></h1> <div style="background-color: rgb(250, 240, 240); clear: none;"> <table style="clear: none;" width="99%"> <tbody><tr style="clear: none;"> <td style="text-align: left; clear: none;">Dato:</td> <td style="text-align: left; clear: none;">Lørdag 21.juli</td> </tr> The able to reproduce the effect with simpler code by setting clear: right on the table. However, I'm unable to reproduce the effect with default styling or with clear: none (as above). So it seems maybe it's something Wordpress does, or maybe it's something the theme thing or whatever it is does – but it's very similar to what others have observed, so there is strong indication that it's also a quirk in IE. Help?

    Read the article

  • Configuration "diff" across Oracle WebCenter Sites instances

    - by Mark Fincham-Oracle
    Problem Statement With many Oracle WebCenter Sites environments - how do you know if the various configuration assets and settings are in sync across all of those environments? Background At Oracle we typically have a "W" shaped set of environments.  For the "Production" environments we typically have a disaster recovery clone as well and sometimes additional QA environments alongside the production management environment. In the case of www.java.com we have 10 different environments. All configuration assets/settings (CSElements, Templates, Start Menus etc..) start life on the Development Management environment and are then published downstream to other environments as part of the software development lifecycle. Ensuring that each of these 10 environments has the same set of Templates, CSElements, StartMenus, TreeTabs etc.. is impossible to do efficiently without automation. Solution Summary  The solution comprises of two components. A JSON data feed from each environment. A simple HTML page that consumes these JSON data feeds.  Data Feed: Create a JSON WebService on each environment. The WebService is no more than a SiteEntry + CSElement. The CSElement queries various DB tables to obtain details of the assets/settings returning this data in a JSON feed. Report: Create a simple HTML page that uses JQuery to fetch the JSON feed from each environment and display the results in a table. Since all assets (CSElements, Templates etc..) are published between environments they will have the same last modified date. If the last modified date of an asset is different in the JSON feed or is mising from an environment entirely then highlight that in the report table. Example Solution Details Step 1: Create a Site Entry + CSElement that outputs JSON Site Entry & CSElement Setup  The SiteEntry should be uncached so that the most recent configuration information is returned at all times. In the CSElement set the contenttype accordingly: Step 2: Write the CSElement Logic The basic logic, that we repeat for each asset or setting that we are interested in, is to query the DB using <ics:sql> and then loop over the resultset with <ics:listloop>. For example: <ics:sql sql="SELECT name,updateddate FROM Template WHERE status != 'VO'" listname="TemplateList" table="Template" /> "templates": [ <ics:listloop listname="TemplateList"> {"name":"<ics:listget listname="TemplateList"  fieldname="name"/>", "modified":"<ics:listget listname="TemplateList"  fieldname="updateddate"/>"}, </ics:listloop> ], A comprehensive list of SQL queries to fetch each configuration asset/settings can be seen in the appendix at the end of this article. For the generation of the JSON data structure you could use Jettison (the library ships with the 11.1.1.8 version of the product), native Java 7 capabilities or (as the above example demonstrates) you could roll-your-own JSON output but that is not advised. Step 3: Create an HTML Report The JavaScript logic looks something like this.. 1) Create a list of JSON feeds to fetch: ENVS['dev-mgmngt'] = 'http://dev-mngmnt.example.com/sites/ContentServer?d=&pagename=settings.json'; ENVS['dev-dlvry'] = 'http://dev-dlvry.example.com/sites/ContentServer?d=&pagename=settings.json';  ENVS['test-mngmnt'] = 'http://test-mngmnt.example.com/sites/ContentServer?d=&pagename=settings.json';  ENVS['test-dlvry'] = 'http://test-dlvry.example.com/sites/ContentServer?d=&pagename=settings.json';   2) Create a function to get the JSON feeds: function getDataForEnvironment(url){ return $.ajax({ type: 'GET', url: url, dataType: 'jsonp', beforeSend: function (jqXHR, settings){ jqXHR.originalEnv = env; jqXHR.originalUrl = url; }, success: function(json, status, jqXHR) { console.log('....success fetching: ' + jqXHR.originalUrl); // store the returned data in ALLDATA ALLDATA[jqXHR.originalEnv] = json; }, error: function(jqXHR, status, e) { console.log('....ERROR: Failed to get data from [' + url + '] ' + status + ' ' + e); } }); } 3) Fetch each JSON feed: for (var env in ENVS) { console.log('Fetching data for env [' + env +'].'); var promisedData = getDataForEnvironment(ENVS[env]); promisedData.success(function (data) {}); }  4) For each configuration asset or setting create a table in the report For example, CSElements: 1) Get a list of unique CSElement names from all of the returned JSON data. 2) For each unique CSElement name, create a row in the table  3) Select 1 environment to represent the master or ideal state (e.g. "Everything should be like Production Delivery") 4) For each environment, compare the last modified date of this envs CSElement to the master. Highlight any differences in last modified date or missing CSElements. 5) Repeat...    Appendix This section contains various SQL statements that can be used to retrieve configuration settings from the DB.  Templates  <ics:sql sql="SELECT name,updateddate FROM Template WHERE status != 'VO'" listname="TemplateList" table="Template" /> CSElements <ics:sql sql="SELECT name,updateddate FROM CSElement WHERE status != 'VO'" listname="CSEList" table="CSElement" /> Start Menus <ics:sql sql="select sm.id, sm.cs_name, sm.cs_description, sm.cs_assettype, sm.cs_assetsubtype, sm.cs_itemtype, smr.cs_rolename, p.name from StartMenu sm, StartMenu_Sites sms, StartMenu_Roles smr, Publication p where sm.id=sms.ownerid and sm.id=smr.cs_ownerid and sms.pubid=p.id order by sm.id" listname="startList" table="Publication,StartMenu,StartMenu_Roles,StartMenu_Sites"/>  Publishing Configurations <ics:sql sql="select id, name, description, type, dest, factors from PubTarget" listname="pubTargetList" table="PubTarget" /> Tree Tabs <ics:sql sql="select tt.id, tt.title, tt.tooltip, p.name as pubname, ttr.cs_rolename, ttsect.name as sectname from TreeTabs tt, TreeTabs_Roles ttr, TreeTabs_Sect ttsect,TreeTabs_Sites ttsites LEFT JOIN Publication p  on p.id=ttsites.pubid where p.id is not null and tt.id=ttsites.ownerid and ttsites.pubid=p.id and tt.id=ttr.cs_ownerid and tt.id=ttsect.ownerid order by tt.id" listname="treeTabList" table="TreeTabs,TreeTabs_Roles,TreeTabs_Sect,TreeTabs_Sites,Publication" />  Filters <ics:sql sql="select name,description,classname from Filters" listname="filtersList" table="Filters" /> Attribute Types <ics:sql sql="select id,valuetype,name,updateddate from AttrTypes where status != 'VO'" listname="AttrList" table="AttrTypes" /> WebReference Patterns <ics:sql sql="select id,webroot,pattern,assettype,name,params,publication from WebReferencesPatterns" listname="WebRefList" table="WebReferencesPatterns" /> Device Groups <ics:sql sql="select id,devicegroupsuffix,updateddate,name from DeviceGroup" listname="DeviceList" table="DeviceGroup" /> Site Entries <ics:sql sql="select se.id,se.name,se.pagename,se.cselement_id,se.updateddate,cse.rootelement from SiteEntry se LEFT JOIN CSElement cse on cse.id = se.cselement_id where se.status != 'VO'" listname="SiteList" table="SiteEntry,CSElement" /> Webroots <ics:sql sql="select id,name,rooturl,updatedby,updateddate from WebRoot" listname="webrootList" table="WebRoot" /> Page Definitions <ics:sql sql="select pd.id, pd.name, pd.updatedby, pd.updateddate, pd.description, pdt.attributeid, pa.name as nameattr, pdt.requiredflag, pdt.ordinal from PageDefinition pd, PageDefinition_TAttr pdt, PageAttribute pa where pd.status != 'VO' and pa.id=pdt.attributeid and pdt.ownerid=pd.id order by pd.id,pdt.ordinal" listname="pageDefList" table="PageDefinition,PageAttribute,PageDefinition_TAttr" /> FW_Application <ics:sql sql="select id,name,updateddate from FW_Application where status != 'VO'" listname="FWList" table="FW_Application" /> Custom Elements <ics:sql sql="select elementname from ElementCatalog where elementname like 'CustomElements%'" listname="elementList" table="ElementCatalog" />

    Read the article

  • How To Get Website Design Inspiration?

    How to get Website Design Inspiration? When it comes to finding inspiration for your website designs it can be a tricky and sometimes time consuming process. I have designed numerous sites in the pa... [Author: Adie Price - Web Design and Development - May 11, 2010]

    Read the article

  • Upcoming Upgrade Workshops in the US

    - by Mike Dietrich
    As Roy is really busy in traveling the whole North American continent I would like to highlight a few of Roy's upcoming workshops with registration links - so simply "click" and register :-) March 23, 2011: Philadelphia, PA March 24, 2011: Reston, VA April 07, 2011: Dallas, TX April 13, 2011: Birmingham, AL April 14, 2011: Minneapolis, MN Roy is looking forward to meet you in one of the above or the upcoming events in California and Oregon. Mike

    Read the article

  • Different Directives for Dot NET

    Directives are those that are responsible for any kind of change in the settings that decide the actions of an entire page. They are language specific and for .NET they function as settings of the pa... [Author: Jessica Woodson - Web Design and Development - April 10, 2010]

    Read the article

  • Sound Channel map incorrect on an ION 330 ASRock

    - by math
    I have a ION 330 ASRock just updated on Precise and the sound channel mapping is incorrect. Channel map is set as follow: Front Left = Front left Center = Rear Left Front Right = Font Right Rear Right = LFE Rear Left = Center LFE = Rear Right I am testing the sound channel using speaker-test -c 2 -t wav Can some one tell me how I can remap easily? I have tried several possible changes to /etc/pulse/defaut.pa unsuccessfully.

    Read the article

  • Issue 56 - Super Stylesheets Skinning in DotNetNuke 5

    May 2010 Welcome to Issue 56 of DNN Creative Magazine In this issue we show you how to use the powerful new Super Stylesheets skinning feature in DotNetNuke 5. Super Stylesheets are ideal for both beginner and experienced skin designers, they provide skin layouts using CSS. The advantage of Super Stylesheets is that you can easily create a skin layout which works in all browsers without the need to learn complex CSS techniques. They are also very quick to build and you can change a skin layout in a matter of minutes rather than hours. We show you how to build a skin from the very beginning using Super Stylesheets, we show you how to create various skin layouts, as well as multi-layouts. We also show you how to style the skin, how to add tokens such as the logo, menu, login links etc. and walk you through how to create a fully working skin from scratch. Following this we continue the Open Web Studio tutorials, this month we demonstrate how to create an installable DotNetNuke PA module using OWS. This is an essential technique which allows you to package up the OWS applications that you have created and build them into an installable zip package. The zip file is then installable as a standard DotNetNuke module which means you can easily install your OWS applications on other DotNetNuke installations by simply installing them as a standard DotNetNuke module. To finish, we have part six of the "How to Build a News Application with DotNetMushroom Rapid Application Developer (RAD)" article, where we demonstrate how to create a News Carousel using RAD, JQuery and the JCarousel plugin. This issue comes complete with 15 videos. Skinning: Super Stylesheets Skinning in DotNetNuke 5 - DNN Layouts (12 videos - 98mins) Module Development Series: How to Create an Installable DotNetNuke PA Module Using OWS (3 videos - 23mins) How to Implement a News Carousel Using DotNetMushroom RAD and JQuery View issue 56 to download all of the videos in one zip file DNN Creative Magazine for DotNetNuke Web Designers Covering DotNetNuke module video reviews, video tutorials, mp3 interviews, resources and web design tips for working with DotNetNuke. In 56 issues we have created 578 videos!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >