Daily Archives

Articles indexed Friday November 8 2013

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

  • General visual effects to meshes/entities

    - by Pacha
    I am trying to add some visual effects to some entities, meshes, or whatever you want to call them as they are looking pretty dull in my game right now. What I want to achieve is this: http://youtu.be/zox8935PLw0?t=36s (the "texture" gets disintegrated and then goes back to normal, covering the whole mesh.) Also I would like to know what is the best way to add effects like the one in the video to my game (for example, thunder effects, shattering, etc.) I know that I can do some things with shaders, but I haven't learned them too well and I am still in a beginner level. I am using Ogre3D, and GLSL for shaders. Thanks! Note: this is a screen-shot of my game, I want to apply the effect in the video to my main character):

    Read the article

  • how to pass an arbitrary signature to Certifcate

    - by eskoba
    I am trying to sign certificate (X509) using secret sharing. that is shareholders combine their signatures to produce the final signature. which will be in this case the signed certificate. however practically from my understanding only one entity can sign a certificate. therefore I want to know: which entities or data of the x509certificate are actually taken as input to the signing algorithm? ideally I want this data to be signed by the shareholders and then the final combination will be passed to the X509certificate as valid signature. is this possible? how could it done? if not are they other alternatives?

    Read the article

  • NullPointerException with static variables

    - by tomekK
    I just hit very strange (to me) behaviour of java. I have following classes: public abstract class Unit { public static final Unit KM = KMUnit.INSTANCE; public static final Unit METERS = MeterUnit.INSTANCE; protected Unit() { } public abstract double getValueInUnit(double value, Unit unit); protected abstract double getValueInMeters(double value); } And: public class KMUnit extends Unit { public static final Unit INSTANCE = new KMUnit(); private KMUnit() { } //here are abstract methods overriden } public class MeterUnit extends Unit { public static final Unit INSTANCE = new MeterUnit(); private MeterUnit() { } ///abstract methods overriden } And my test case: public class TestMetricUnits extends TestCase { @Test public void testConversion() { System.out.println("Unit.METERS: " + Unit.METERS); System.out.println("Unit.KM: " + Unit.KM); double meters = Unit.KM.getValueInUnit(102.11, Unit.METERS); assertEquals(0.10211, meters, 0.00001); } } 1) MKUnit and MeterUnit are both singletons initialized statically, so during class loading. Constructors are private, so they can't be initialized anywhere else. 2) Unit class contains static final references to MKUnit.INSTANCE and MeterUnit.INSTANCE I would expect that: KMUnit class is loaded and instance is created. MeterUnit class is loaded and instance is created. Unit class is loaded and both KM and METERS variable are initialized, they are final so they cant be changed. But when I run my test case in console with maven my result is: T E S T S Running de.audi.echargingstations.tests.TestMetricUnits Unit.METERS: m Unit.KM: null Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.089 sec <<< FAILURE! - in de.audi.echargingstations.tests.TestMetricUnits testConversion(de.audi.echargingstations.tests.TestMetricUnits) Time elapsed: 0.011 sec <<< ERROR! java.lang.NullPointerException: null at de.audi.echargingstations.tests.TestMetricUnits.testConversion(TestMetricUnits.java:29) Results : Tests in error: TestMetricUnits.testConversion:29 NullPointer And the funny part is that, when I run this test from eclipse via JUnit runner everything is fine, I have no NullPointerException and in console I have: Unit.METERS: m Unit.KM: km So the question is: what can be the reason that KM variable in Unit is null (and in the same time METERS is not null)

    Read the article

  • classic asp ignore comma within speach marks CSV

    - by user2968227
    I Have a CSV File that looks like this 1,HELLO,ENGLISH 2,HELLO1,ENGLISH 3,HELLO2,ENGLISH 4,HELLO3,ENGLISH 5,HELLO4,ENGLISH 6,HELLO5,ENGLISH 7,HELLO6,ENGLISH 8,"HELLO7, HELLO7 ...",ENGLISH 9,HELLO7,ENGLISH 10,HELLO7,ENGLISH I want to step loop through the lines and write to a table using split classic asp function by comma. When Speech marks are present to ignore the comma within those speech marks and take the string. Please help. <% dim csv_to_import,counter,line,fso,objFile csv_to_import="uploads/testLang.csv" set fso = createobject("scripting.filesystemobject") set objFile = fso.opentextfile(server.mappath(csv_to_import)) str_imported_data="<table cellpadding='3' cellspacing='1' border='1'>" Do Until objFile.AtEndOfStream line = split(objFile.ReadLine,",") str_imported_data=str_imported_data&"<tr>" total_records=ubound(line) for i=0 to total_records if i>0 then str_imported_data=str_imported_data&"<td>"&line(i)&"</td>" else str_imported_data=str_imported_data&"<th>"&line(i)&"</th>" end if next str_imported_data=str_imported_data&"</tr>" & chr(13) Loop str_imported_data=str_imported_data&"<caption>Total Number of Records: "&total_records&"</caption></table>" objFile.Close response.Write str_imported_data %>

    Read the article

  • Is it a good practice to have trim in setter?

    - by zibi
    I'm doing a code review and I noticed such a code: @Entity @Table(name = "SOME_TABLE") public class SomeReportClass { @Column(name = "REPORT_NUMBER", length = 6, nullable = false) private String reportNumber; ..... public String getReportNumber() { return reportNumber; } public void setReportNumber(String reportNumber) { this.reportNumber = StringUtils.trimToNull(reportNumber); } } Every time I see trimming inside of a setter I feel that its not the clearest solution - what is the general practice with that issue?

    Read the article

  • Good practice of using list of function in Python

    - by riskio
    I am pretty new to python and I discovered by myself that I can create a list of function and call with a for loop. example: def a(args): print "A" def b(args): print "B" def c(args): print "C " + str(args) functions = [a,b,c] for i in functions: i(1) So, my question is: is there any good practice or elegant way to use list of functions and what is a good use of all this? (do have a particular name the "list of functions"?) thank you

    Read the article

  • a script translatable to JavaScript with callback-hell automatic avoider :-)

    - by m1uan
    I looking for "translator" for JavaScript like already is CoffeScript, which will be work for example with forEach (inspired by Groovy) myArray.forEach() -> val, idx { // do something with value and idx } translate to JavaScript myArray.forEach(function(val, idx){ // do something with value and idx }); or something more usefull... function event(cb){ foo()-> err, data1; bar(data1)-> err, data2; cb(data2); } the method are encapsulated function event(cb){ foo(function(err,data1){ bar(data1, function(err, data2) { cb(data2); }); }); } I want ask if similar "compiler" to JavaScript like this even better already doesn't exists? What would be super cool... my code in nodejs looks mostly like this :-) function dealer(cb){ async.parallel([ function(pcb){ async.watterfall([function(wcb){ first(function(a){ wcb(a); }); }, function(a, wcb){ thirt(a, function(c){ wcb(c); }); fourth(a, function(d){ // dealing with “a” as well and nobody care my result }); }], function(err, array_with_ac){ pcb(array_with_ac); }); }, function(pcb){ second(function(b){ pcb(b);}); }], function(err, data){ cb(data[0][0]+data[1]+data[0][1]); // dealing with “a” “b” and “c” not with “d” }); } but, look how beautiful and readable the code could be: function dealer(cb){ first() -> a; second() -> b; third(a) -> c; // dealing with “a” fourth(a) -> d; // dealing with “a” as well and nobody care about my result cb(a+b+c); // dealing with “a” “b” and “c” not with “d” } yes this is ideal case when the translator auto-decide, method need to be run as parallel and method need be call after finish another method. I can imagine it's works Please, do you know about something similar? Thank you for any advice;-)

    Read the article

  • App stays in splash screen in iOS 7.0.3

    - by Sathish
    Recently in iOS 7.0.3, my app stays in the splash screen and was not going into the app at all. If i kill the app, and launch it again it opens up without any issues. Can anyone help me on this issue?. I think the application -didFinishLaunchingWithOptions was not returning yes. Note: I have a lot of stuffs like deleting database, initializing a dozen of buttons in appdelegate's *init* function. I know that it is a bad practice to have things in init but since its been there for more than 4 years and was working fine with previous OS versions i didn't find a good reason to change it. Also this issue is not happening all the time. My app size is 40 MB. Thanks in advance...

    Read the article

  • jQuery AJAX Loading Page Content Only After I Press Shift Key

    - by Cosmin
    My ajax + jquery loading page only after holding shift key and duplicate new empty window. If I press the loading button nothing hapen, only after I press shift key I get to load the page correctly... this is my ajax script: $(document).ready(function () { $(".getUsersA").click(function () { $.ajax({ beforeSend: function () { $(".gridD").html(spinner) }, url: 'lib/some_url.php', type: 'POST', data: ({ data1:'2013-09-01' }), success: function (results) {$(".gridD").html(results);} }); }); }); I have a second js file with just this line of code for spinner var spinner = "<img src='images/spinner.gif' border='0'>"; html code: <html> <head> <title>Title</title> <script type="text/javascript" src="js/jquery-1.10.2.js"></script> <script type="text/javascript" src="js/ajax.js"></script> <script type="text/javascript" src="js/general.js"></script> </head> <body> <h1>Putting it all tugether ... with jQuery</h1> <div class="thedivD"><a href="" class="buttonA getUsersA">Get Users</a></div> <h3>jQuery results</h3> <div class="gridD"></div> </body> </html>

    Read the article

  • how to properly transfer user input from index to invoice?

    - by Romel
    I got a dillema, I'm trying to find a solution for my code. How do I make it so that when the user inputs a given quantity in the text box from the index.php it will transfer that input quantity to the invoice.php. I've tried doing the post method but it seems like it's not working :/ As always, any help or suggestions will be greatly appreciated! I hope it's something simple:( Here's my code: index.php <html> <style> body{ background-image: url('URL HERE'); font-family: "Helvetica"; font-size:15px; } h1{ color:black; text-align:center; } p{ font-size:15px; } </style> <h1> STORE TITLE HERE </h1> <body> <form action="login.php" method="post"> <?php //Include products info.inc (Which holds all our product arrays and info) //Credit: Tracy & Mark (THank you!) include 'products_info.inc'; /*The following code centers my table on the page, makes the table background white, makes the table 50% of the browser window, gives it a border of 1 px, gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells. */ echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1 cellspacing=2>"; //Credit: Tracy & Mark (THank you!) echo '<th>Product</th> <th>Description</th> <th>Price</th> <th>Quantity</th>'; //The following code loops through the whole table body and then prints each row. for($i=0; $i<count($allfood); $i++) { //Credit: Tracy & Mark (THank you!) echo "<tr align=center>"; echo "<td>{$allfood[$i]['Product']}</td>"; echo "<td>{$allfood[$i]['Description']}</td>"; echo "<td>{$allfood[$i]['Price']}</td>"; echo "<td>{$allfood[$i]['Quantity']}</td>"; echo "</tr>"; } //This code ends the table. echo "</table>"; echo "<br>"; ?> <br><center><input type='submit' name='purchase' value='Purchase'></center> </form> </body> </html> And here's my invoice.php <html> <style> body{ background-image: url('URL HERE'); font-family: "Helvetica"; font-size:15px; } h1{ color:black; text-align:center; } p{ font-size:15px; } </style> <h1> Invoice </h1> </html> <?php //Include products info.inc (Which holds all our product arrays and info) //Credit: Tracy & Mark (Thank you!) include 'products_info.inc'; //Display the invoice & 'WELCOME USER. THANK YOU FOR USING THIS DAMN THING msg' /*The following code centers my invoice table on the page, makes the table background white, makes the table 50% of the browser window, gives it a border of 1 px, gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells. */ echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1cellspacing=2>"; echo "<tr>"; echo "<td align=center><b>Product</b></td>"; echo "<td align=center><b>Quantity</b></td>"; echo "<td align=center><b>Price</></td>"; echo "<td align=center><b>Extended Price</b></td>"; echo "</tr>"; for($i=0; $i<count($allfood); $i++) { //Credit: Tracy & Mark (Thank you!) $qty= @$_POST['Quantity']['$i']; // This calculates the price if the user orders more than 1 item. $extendedprice = $qty*$allfood[$i]['Price']; echo "<tr>"; echo "<td align=center>{$allfood[$i]['Product']}</td>"; echo "<td align=center>$extendedprice</td>"; echo "<td align=center>{$allfood[$i]['Price']}</td>"; echo "</tr>"; } // The goal here was to make it so that if the user selected a certain quantity from index.php, it would carry over and display on the invoice.php if ($qty = 0) { echo "please choose 1"; } elseif ($qty > 0) { echo $qty; } /*echo "<tr>"; echo "<td align=center>Subtotal</b></td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; echo "<tr>"; echo "<td align=center>Tax at 5.75%</td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; echo "<tr>"; echo "<td align=center><b>Grand total</b></td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; */ echo "</table>"; ?> <br> <center> <form action="index.php" method="post"> <input type="submit" name="home" value="Back to homepage"> </form> </center>

    Read the article

  • Get item from spinner into url

    - by ShadowCrowe
    I searched for an answer but couldn't find it. The problem: Depending on the selected spinner-item the application should show a different image. At this moment I can't get it to work. The Url works like this: "my.site.com/images/" imc_met ".png" were imc_met is the filename. I can't get it to work. Btw the app isn't finished yet package example.myapplication; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.Spinner; public class itemsActivity extends Activity { private Spinner spinner1, spinner2; private Button btnSubmit; private Bitmap image; private ImageView imageView; private String imc_met, imc; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.items); addItemsOnSpinner2(); addListenerOnButton(); addListenerOnSpinnerItemSelection(); } // add items into spinner dynamically public void addItemsOnSpinner2() { spinner2 = (Spinner) findViewById(R.id.spinner2); List<String> list = new ArrayList<String>(); list.add("list 1"); list.add("list 2"); list.add("list 3"); ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list); dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner2.setAdapter(dataAdapter); } public void addListenerOnSpinnerItemSelection() { spinner1 = (Spinner) findViewById(R.id.spinner1); spinner1.setOnItemSelectedListener(new CustomOnItemSelectedListener()); } // get the selected dropdown list value public void addListenerOnButton() { spinner1 = (Spinner) findViewById(R.id.spinner1); spinner2 = (Spinner) findViewById(R.id.spinner2); btnSubmit = (Button) findViewById(R.id.btnSubmit); spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { if(spinner1.getSelectedItem()!=null){ imc_met = spinner1.getSelectedItem().toString(); } } @Override public void onNothingSelected(AdapterView<?> arg0) { // TODO Auto-generated method stub } }); imageView = (ImageView)findViewById(R.id.ImageView01); btnSubmit.setOnClickListener(new OnClickListener() { public void onClick(View v) { URL url = null; try { url = new URL("my.site.com"); //here should the right link appear. } catch (MalformedURLException e) { e.printStackTrace(); } try { if (url != null) { image = BitmapFactory.decodeStream(url.openStream()); } } catch (IOException e) { e.printStackTrace(); } imageView.setImageBitmap(image); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }

    Read the article

  • Toggling audio on click?

    - by angela
    please look at this fiddle http://jsfiddle.net/rabelais/yLdkj/1/ The above fiddle shows three bars that on hover play audios. How do I change this so the music plays and pauses on click instead. Also if one audio is playing and another is clicked how can the already playing song pause? $("#one").mouseenter(function () { $('#sound-1').get(0).play(); }); $("#one").mouseleave(function () { $('#sound-1').get(0).pause(); }); $("#two").mouseenter(function () { $('#sound-2').get(0).play(); }); $("#two").mouseleave(function () { $('#sound-2').get(0).pause(); }); $("#three").mouseenter(function () { $('#sound-3').get(0).play(); }); $("#three").mouseleave(function () { $('#sound-3').get(0).pause(); });

    Read the article

  • Django: where do I call settings.configure?

    - by RexE
    The Django docs say that I can call settings.configure instead of having a DJANGO_SETTINGS_MODULE. I would like my website's project to do this. In what file should I put the call to settings.configure so that my settings will get configured at the right time? Edit in response to Daniel Roseman's comment: The reason I want to do this is that settings.configure lets you pass in the settings variables as a kwargs dict, e.g. {'INSTALLED_APPS': ..., 'TEMPLATE_DIRS': ..., ...}. This would allow my app's users to specify their settings in a dict, then pass that dict to a function in my app that augments it with certain settings necessary to make my app work, e.g. adding entries to INSTALLED_APPS. What I envision looks like this. Let's call my app "rexe_app". In wsgi.py, my app's users would do: import rexe_app my_settings = {'INSTALLED_APPS': ('a','b'), ...} updated_settings = rexe_app.augment_settings(my_settings) # now updated_settings is {'INSTALLED_APPS': ('a','b','c'), 'SESSION_SAVE_EVERY_REQUEST': True, ...} settings.configure(**updated_settings)

    Read the article

  • Delphi set Panel visible after post

    - by Daan Kleijngeld
    this is my code: if DRelatiebeheer.ContactpersoonID.Post = Action then KJSMDBGrid1.RefreshData; KJPanel4.Visible := true; my question is how can i set the panel on visible when the post is succesfully ended. I dont know how to fix it, tried many ways but didn't find a solution for the problem. I think the code doesn't work, because i put it invisible on the OnGetCellParams event. And I only want to set the last panel visible when the information is posted procedure TFRelatiebeheer.KJSMDBGrid1GetCellParams(Sender: TObject); begin if DRelatiebeheer.ACCID.AsInteger <= 0 then KJPanel3.Visible := false; KJPanel4.Visible := false; else begin KJPanel3.Visible := true; end; this is my OnGetCellParams event, this is the other procedure TFRelatiebeheer.SaveCancel(Sender: TObject); begin if (DRelatiebeheer.CID.State in [dsEdit, dsInsert]) then DRelatiebeheer.CID.Post; DRelatiebeheer.AID.Post; if DRelatiebeheer.CID.Post = Action then KJSMDBGrid1.RefreshData; KJPanel4.Visible := true; end;

    Read the article

  • How can I have HTML tab expansion in ST2 w/ Emmet inside Handlebars templates(emberjs)?

    - by Zuko
    Okay, so I'm using Sublime Text 2 with Emmet. But "Tab" expansion of HTML snippets doesn't work inside a script because of the scope. Example: In HTML, I can type "h1" and then hit tab, and it will generate "" When using Ember.js, and more specifically Handlebars, it doesn't work. <script type="text/x-handlebars"> h1 </script> Pressing tab after that "h1" doesn't expand it because it's inside a script; Emmet turns this off. I can press Ctrl+E, which is the "expand anywhere" hotkey, and that works just fine. However, that is uncomfortable and prone to missing and hitting things like Ctrl+S or Ctrl+D which have undesired effects. So, how can I change this? I tweeted at the developer, and got a reply, https://twitter.com/chikuyonok/status/398708331969540096 But couldn't understand what to do.

    Read the article

  • Implement a generic C++/CLI interface in a C# generic interface

    - by Florent
    I have a C++/CLI generic interface like this : using namespace System::Collections::Generic; namespace Test { generic <class T> public interface class IElementList { property List<T>^ Elements; }; } and I want to implement it in a C# generic interface like this : using Test; namespace U { public interface IElementLightList<T> : IElementList<T> where T : IElementLight { bool isFrozen(); bool isPastable(); } } This don't work, Visual Studio is not able to see C++/CLI IElementList interface ! I tested with a not generic C++/CLI interface and this work. What I missed ?

    Read the article

  • How to add chain of certificate in spring ws client request

    - by hudi
    I have simply spring ws client which sending request to some url: @SuppressWarnings("unchecked") private JAXBElement<O> sendSyncSoapRequest(final JAXBElement<I> req, final String iszrUrl) { if (iszrUrl != null) { return (JAXBElement<O>) this.wsTemplate.marshalSendAndReceive(iszrUrl, req); } else { return (JAXBElement<O>) this.wsTemplate.marshalSendAndReceive(req); } } Now I need attach chain of certificate to the soap request. How should I do this ? Please help

    Read the article

  • Adding Days To Date in SQL

    - by Coding Noob
    I am trying to get data from my Database of those who have upcoming birth days in next few days(declared earlier) it's working fine for days but this query will not work if i add 24 days to current date cause than it will need change in month. i wonder how can i do it declare @date int=10, @month int=0 select * from STUDENT_INFO where DATEPART(DD,STDNT_DOB) between DATEPART(DD,GETDATE()) and DATEPART(DD,DATEADD(DD,@date,GETDATE())) and DATEPART(MM,STDNT_DOB) = DATEPART(MM,DATEADD(MM,@month,GETDATE())) This query works fine but it only checks date between 8 & 18 but if i use it like this declare @date int=30, @month int=0 select * from STUDENT_INFO where DATEPART(DD,STDNT_DOB) between DATEPART(DD,GETDATE()) and DATEPART(DD,DATEADD(DD,@date,GETDATE())) and DATEPART(MM,STDNT_DOB) = DATEPART(MM,DATEADD(MM,@month,GETDATE())) it will return nothing since it require addition in month as well If I Use it like this declare @date int=40, @month int=0 select * from STUDENT_INFO where DATEPART(DD,STDNT_DOB) between DATEPART(DD,GETDATE()) and DATEADD(DD,@date,GETDATE()) and DATEPART(MM,STDNT_DOB) = DATEPART(MM,DATEADD(MM,@month,GETDATE())) than it will return results till the last of this month but will not show till 18/12 which was required

    Read the article

  • how to save sitecore webpage in html file on local disk or server

    - by Sam
    WebRequest mywebReq ; WebResponse mywebResp ; StreamReader sr ; string strHTML ; StreamWriter sw; mywebReq = WebRequest.Create("http://domain/sitecore/content/test/page10.aspx"); mywebResp = mywebReq.GetResponse(); sr = new StreamReader(mywebResp.GetResponseStream()); strHTML = sr.ReadToEnd(); sw = File.CreateText(Server.MapPath("hello.html")); sw.WriteLine(strHTML); sw.Close(); Hi , I want to save sitecore .aspx page into html file on local disk , but i am getting exception. But if i use any other webpage example(google.com) it works fine. The exception : System.Net.WebException was caught HResult=-2146233079 Message=The remote server returned an error: (404) Not Found. Source=System StackTrace: at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at BlueDiamond.addmodule.btnSubmit(Object sender, EventArgs e) in c:\inetpub\wwwroot\STGLocal\Website\addmodule.aspx.cs:line 97 InnerException: Any help. Thanks in advance

    Read the article

  • how to add multiview in a radio button

    - by Naveen31
    protected void ddlto_SelectedIndexChanged(object sender, EventArgs e) { } protected void RadioButton1_CheckedChanged1(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 0; } protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 2; } <asp:RadioButtonList ID="RadioButtonList2" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" Font-Names="Arial" Font-Size="Small" onselectedindexchanged="MultiView1_ActiveViewChanged"> <asp:ListItem Selected="True">One Way</asp:ListItem> <asp:ListItem>Round Trip</asp:ListItem> <asp:ListItem>Multi City</asp:ListItem> </asp:RadioButtonList> i have a radiolist of thre buttons-one way,round trip and multicity, i have taken a multiview in which in view 2 i have added the codes codes,and i want to show that code when i click on the 2nd radio button i.e on round trip,how to do it. plzz help

    Read the article

  • Reduce size and change text color of the bootstrap-datepicker field

    - by Lisarien
    Programing an Android application based on HTML5/JQuery launching in a web view, I'm using the Eternicode's bootstrap-datepicker. BTW I'm using Jquery 1.9.1 and Bootstrap 2.3.2 with bootstrap-responsive. The picker is working fine but unfortunately I get yet two issues which I was not able to solve at this time: the picker theme is not respected and some dates are not readable (see the attached picture). Some there is css conflict such as the datepicker's font is displayed white on white background. I'm not able to reduce the size of the date picker field such as it holds on alone row. My markup code is: <div class="row-fluid" style="margin-right:0px!important"> <label id="dateId" class="span6">One Date</label> <div id="datePurchase" class="input-append date"> <input data-format="yyyy-MM-dd" type="text" /> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> </span> </div> </div> I init the datepicker by Javascript: $("#dateId").datetimepicker({ pickTime: false, format: "dd/MM/yyyy", startDate: startDate, endDate: endDate, autoclose: true }); $("#dateId").on("changeDate", onChangeDate); Do you get any idea about these issues? Thanks very much

    Read the article

  • Setting the height of a row in a JTable in java

    - by Douglas Grealis
    I have been searching for a solution to be able to increase the height of a row in a JTable. I have been using the setRowHeight(int int) method which compiles and runs OK, but no row[s] have been increased. When I use the getRowHeight(int) method of the row I set the height to, it does print out the size I increased the row to, so I'm not sure what is wrong. The code below is a rough illustration how I am trying to solve it. My class extends JFrame. String[] columnNames = {"Column 1", "Column 2", "Column 1 3"}; JTable table = new JTable(new DefaultTableModel(columnNames, people.size())); DefaultTableModel model = (DefaultTableModel) table.getModel(); int count =1; for(Person p: people) { model.insertRow(count,(new Object[]{count, p.getName(), p.getAge()+"", p.getNationality})); count++; } table.setRowHeight(1, 15);//Try set height to 15 (I've tried higher) Can anyone tell me where I am going wrong? I am trying to increase the height of row 1 to 15 pixels?

    Read the article

  • list of polymorphic objects

    - by LivingThing
    I have a particular scenario below. The code below should print 'say()' function of B and C class and print 'B says..' and 'C says...' but it doesn't .Any ideas.. I am learning polymorphism so also have commented few questions related to it on the lines of code below. class A { public: // A() {} virtual void say() { std::cout << "Said IT ! " << std::endl; } virtual ~A(); //why virtual destructor ? }; void methodCall() // does it matters if the inherited class from A is in this method { class B : public A{ public: // virtual ~B(); //significance of virtual destructor in 'child' class virtual void say () // does the overrided method also has to be have the keyword 'virtual' { cout << "B Sayssss.... " << endl; } }; class C : public A{ public: //virtual ~C(); virtual void say () { cout << "C Says " << endl; } }; list<A> listOfAs; list<A>::iterator it; # 1st scenario B bObj; C cObj; A *aB = &bObj; A *aC = &cObj; # 2nd scenario // A aA; // B *Ba = &aA; // C *Ca = &aA; // I am declaring the objects as in 1st scenario but how about 2nd scenario, is this suppose to work too? listOfAs.insert(it,*aB); listOfAs.insert(it,*aC); for (it=listOfAs.begin(); it!=listOfAs.end(); it++) { cout << *it.say() << endl; } } int main() { methodCall(); retrun 0; }

    Read the article

  • Xcode "Build and Archive" from command line

    - by Dan Fabulich
    Xcode 3.2 provides an awesome new feature under the Build menu, "Build and Archive" which generates an .ipa file suitable for Ad Hoc distribution. You can also open the Organizer, go to "Archived Applications," and "Submit Application to iTunesConnect." Is there a way to use "Build and Archive" from the command line (as part of a build script)? I'd assume that xcodebuild would be involved somehow, but the man page doesn't seem to say anything about this. UPDATE Michael Grinich requested clarification; here's what exactly you can't do with command-line builds, features you can ONLY do with Xcode's Organizer after you "Build and Archive." You can click "Share Application..." to share your IPA with beta testers. As Guillaume points out below, due to some Xcode magic, this IPA file does not require a separately distributed .mobileprovision file that beta testers need to install; that's magical. No command-line script can do it. For example, Arrix's script (submitted May 1) does not meet that requirement. More importantly, after you've beta tested a build, you can click "Submit Application to iTunes Connect" to submit that EXACT same build to Apple, the very binary you tested, without rebuilding it. That's impossible from the command line, because signing the app is part of the build process; you can sign bits for Ad Hoc beta testing OR you can sign them for submission to the App Store, but not both. No IPA built on the command-line can be beta tested on phones and then submitted directly to Apple. I'd love for someone to come along and prove me wrong: both of these features work great in the Xcode GUI and cannot be replicated from the command line.

    Read the article

  • c# how to set up and use session state from preinit

    - by Praesagus
    OK so to set and read variables from the current session String Myvar =(string) System.Web.HttpContext.Current.Session[“MyVariable”] To set System.Web.HttpContext.Current.Session[“MyVariable”] = “NewValue” I can do neither, I get a System.NullReferenceException: Object reference not set to an instance of an object. from System.Web.HttpContext.Current.Session. In my web.config I have <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20"> </sessionState> I have read a dozen articles on the the necessity of IHttpHandler and an IRequiresSessionState interface. I think the issue may be caused because I am requesting this information in Page_PreInit. I found a solution in a stack overflow article but I don't seem be using it properly to actually make this go. I am not sure what I am missing. Thanks in advance.

    Read the article

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