Daily Archives

Articles indexed Wednesday January 5 2011

Page 15/35 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • java gui image problem : doesn't display in the background

    - by thegamer
    Hello, i have a query about why is my image not being displayed in my background of my program. I mean i did all the steps necessary and still it would'nt be displayed. The code runs perfectly but without having the image displayed. The directory is written in the good location of the image. I am using java with gui. If anyone could help me solve my problem, i would appreciate :) here is the code below: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class hehe extends JPanel{ public hehe(){ setOpaque(false); setLayout(new FlowLayout()); } public static void main (String args[]){ JFrame win = new JFrame("yooooo"); // it is automaticcally hidden JPanel mainPanel = new JPanel(new BorderLayout()); win.add(mainPanel); JLabel titleLabel = new JLabel("title boss"); titleLabel.setFont(new Font("Arial",Font.BOLD,18)); titleLabel.setForeground(Color.blue); mainPanel.add(titleLabel,BorderLayout.NORTH); win.setSize(382,269); // the dimensions of the image win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); win.setVisible(true); } public void paint(Graphics g) { Image a = Toolkit.getDefaultToolkit().getImage("C:\\Users\\andrea\\Desktop\\Gui\\car"); // car is the name of the image file and is in JPEG g.drawImage(a,0,0,getSize().width,getSize().height,this); super.paint(g); } }

    Read the article

  • Database Functional Programming in Clojure

    - by Ralph
    "It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail." - Abraham Maslow I need to write a tool to dump a large hierarchical (SQL) database to XML. The hierarchy consists of a Person table with subsidiary Address, Phone, etc. tables. I have to dump thousands of rows, so I would like to do so incrementally and not keep the whole XML file in memory. I would like to isolate non-pure function code to a small portion of the application. I am thinking that this might be a good opportunity to explore FP and concurrency in Clojure. I can also show the benefits of immutable data and multi-core utilization to my skeptical co-workers. I'm not sure how the overall architecture of the application should be. I am thinking that I can use an impure function to retrieve the database rows and return a lazy sequence that can then be processed by a pure function that returns an XML fragment. For each Person row, I can create a Future and have several processed in parallel (the output order does not matter). As each Person is processed, the task will retrieve the appropriate rows from the Address, Phone, etc. tables and generate the nested XML. I can use a a generic function to process most of the tables, relying on database meta-data to get the column information, with special functions for the few tables that need custom processing. These functions could be listed in a map(table name -> function). Am I going about this in the right way? I can easily fall back to doing it in OO using Java, but that would be no fun. BTW, are there any good books on FP patterns or architecture? I have several good books on Clojure, Scala, and F#, but although each covers the language well, none look at the "big picture" of function programming design.

    Read the article

  • upload file on database through php code

    - by ruhit
    hi all I have made an application to upload files and its workingout well.now I want to upload my files on database and I also want to display the uploaded files names on my listby accessing the database....so kindly help me. my codes are given below- function uploadFile() { global $template; //$this->UM_index = $this->session->getUserId(); switch($_REQUEST['cmd']){ case 'upload': $filename = array(); //set upload directory //$target_path = "F:" . '/uploaded/'; for($i=0;$i<count($_FILES['ad']['name']);$i++){ if($_FILES["ad"]["name"]) { $filename = $_FILES["ad"]["name"][$i]; $source = $_FILES["ad"]["tmp_name"][$i]; $type = $_FILES["ad"]["type"]; $name = explode(".", $filename); $accepted_types = array('text/html','application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed'); foreach($accepted_types as $mime_type) { if($mime_type == $type) { $okay = true; break; } } $continue = strtolower($name[1]) == 'zip' ? true : false; if(!$continue) { $message = "The file you are trying to upload is not a .zip file. Please try again."; } $target_path = "F:" . '/uploaded/'.$filename; // change this to the correct site path if(move_uploaded_file($source, $target_path )) { $zip = new ZipArchive(); $x = $zip->open($target_path); if ($x === true) { $zip->extractTo("F:" . '/uploaded/'); // change this to the correct site path $zip->close(); unlink($target_path); } $message = "Your .zip file was uploaded and unpacked."; } else { $message = "There was a problem with the upload. Please try again."; } } } echo "Your .zip file was uploaded and unpacked."; $template->main_content = $template->fetch(TEMPLATE_DIR . 'donna1.html'); break; default: $template->main_content = $template->fetch(TEMPLATE_DIR . 'donna1.html'); //$this->assign_values('cmd','uploads'); $this->assign_values('cmd','upload'); } } my html page is <html> <link href="css/style.css" rel="stylesheet" type="text/css"> <!--<form action="{$path_site}{$index_file}" method="post" enctype="multipart/form-data">--> <form action="index.php?menu=upload_file&cmd=upload" method="post" enctype="multipart/form-data"> <div id="main"> <div id="login"> <br /> <br /> Ad No 1: <input type="file" name="ad[]" id="ad1" size="10" />&nbsp;&nbsp;Image(.zip)<input type="file" name="ad[]" id="ad1" size="10" /> Sponsor By : <input type="text" name="ad3" id="ad1" size="25" /> <br /> <br /> </div> </div> </form> </html>

    Read the article

  • Attempt to create nested for loops generating missing arguments error

    - by JerryK
    Am attempting to teach myself to program using Tcl. (I want to become more familiar with the language to understand someone else's code - SCID chess) The task i've set myself to motivate my learing of Tcl is to solve the 8 queens problem. My approach to creating a program is to sucessively 'prototype' a solution. So. I'm up to nesting a for loop holding the q pos on row 2 inside the for loop holding the q pos on row 1 Here is my code set allowd 1 set notallowd 0 for {set r1p 1} {$r1p <= 8} {incr r1p } { puts "1st row q placed at $r1p" ;# re-initialize r2 'free for q placemnt' array after every change of r1 q pos: for {set i 1 } {$i <= 8} {incr i} { set r2($i) $allowd } for { set r2($r1p) $notallowd ; set r2([eval $r1p-1]) $notallowd ; set r2([eval $r1p+1]) $notallowd ; set r2p 1} {$r2p <= 8} { incr r2p ;# end of 'next' arg of r2 forloop } ;# commnd arg of r2 forloop placed below: {puts "2nd row q placed at $r2p" } } My problem is that when i run the code the interpreter is aborting with the fatal error: "wrong #args should be for start test next command. I've gone over my code a few times and can't see that i've missed any of the for loop arguments.

    Read the article

  • how to set layout_weight programmatically for alert dialog button?

    - by Are
    Hi, Iam planing to give create 3 buttons with layout_weight=1, not interested in custom dialog.So I have written below code.It is not working.Always yes button gives me null. Whats wrong in this code? AlertDialog dialog= new AlertDialog.Builder(this).create(); dialog.setIcon(R.drawable.alert_icon); dialog.setTitle("title"); dialog.setMessage("Message"); dialog.setButton(AlertDialog.BUTTON_POSITIVE,"Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface arg0, int arg1) { } }); Button yesButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE); Log.w("Button",""+yesButton);//here getting null LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1f); yesButton.setLayoutParams(layoutParams); dialog.show(); Regards, Android developer.

    Read the article

  • All connections in pool are in use

    - by veljkoz
    We currently have a little situation on our hands - it seems that someone, somewhere forgot to close the connection in code. Result is that the pool of connections is relatively quickly exhausted. As a temporary patch we added Max Pool Size = 500; to our connection string on web service, and recycle pool when all connections are spent, until we figure this out. So far we have done this: SELECT SPId FROM MASTER..SysProcesses WHERE DBId = DB_ID('MyDb') and last_batch < DATEADD(MINUTE, -15, GETDATE()) to get SPID's that aren't used for 15 minutes. We're now trying to get the query that was executed last using that SPID with: DBCC INPUTBUFFER(61) but the queries displayed are various, meaning either something on base level regarding connection manipulation was broken, or our deduction is erroneous... Is there an error in our thinking here? Does the DBCC / sysprocesses give results we're expecting or is there some side-effect catch? (for example, connections in pool influence?) (please, stick to what we could find out using SQL since the guys that did the code are many and not all present right now)

    Read the article

  • Converting byte[] of binary fixed point to floating point value?

    - by Sean Donohue
    I'm reading some data over a socket. The integral data types are no trouble, the System.BitConverter methods are correctly handling the conversion. (So there are no Endian issues to worry about, I think?) However, BitConverter.ToDouble isn't working for the floating point parts of the data...the source specification is a bit low level for me, but talks about a binary fixed point representation with a positive byte offset in the more significant direction and negative byte offset in the less significant direction. Most of the research I've done has been aimed at C++ or a full fixed-point library handling sines and cosines, which sounds like overkill for this problem. Could someone please help me with a C# function to produce a float from 8 bytes of a byte array with, say, a -3 byte offset?

    Read the article

  • Attempt to use a while loop for the 'next' arg of a for loop generates #arg error

    - by JerryK
    Am attempting to teach myself to program using Tcl. The task i've set myself to motivate my learning of Tcl is to solve the 8 queens problem. My approach to creating a program is to successively 'prototype' a solution. I have asked an earlier question related to the correctly laying out the nested for loops and received a helpful answer. To my dismay I find that the next development of my code creates the same interpreter error : "wrong # args" I have been careful to have an open brace at the end of the line preceding the while loop command. I've also tried to put the arguments of the whileloop in braces. This generates a different error. I have sincerely tried to understand the Tcl syntax man page - not too successfully - suggested by the answerer of my earlier question. Here is the code set allowd 1 set notallowd 0 for {set r1p 1} {$r1p <= 8} {incr r1p } { puts "1st row q placed at $r1p" ;# re-initialize r2 'free for q placemnt' array after every change of r1 q pos: for {set i 1 } {$i <= 8} {incr i} { set r2($i) $allowd } for { set r2($r1p) $notallowd ; set r2([expr $r1p-1]) $notallowd ; set r2([expr $r1p+1]) $notallowd ; set r2p 1} {$r2p <= 8} { ;# 'next' arg of r2 forloop will be a whileloop : while r2($r2p)== $notallowd incr r2p } { puts "2nd row q placed at $r2p" ;# end of 'commnd' arg of r2 forloop } } Where am I going wrong? EDIT : to provide clear reply @slebetman As stated in my text, I did brace the arguments of the whileloop (indeed that was how i first wrote the code) below is exactly the layout of the r2 forloop tried: for { set r2($r1p) $notallowd ; set r2([expr $r1p-1]) $notallowd ; set r2([expr $r1p+1]) $notallowd ; set r2p 1} {$r2p <= 8} { ;# 'next' arg of r2 forloop will be a whileloop : while { r2($r2p)== $notallowd } { incr r2p } } { puts "2nd row q placed at $r2p" ;# end of 'commnd' arg of r2 forloop } but this generates the fatal interpreter error : "unknown math function 'r2' while compiling while { r2($r2p .... "

    Read the article

  • C# WCF and Object Inheritence

    - by Michael Edwards
    I have the following setup of two classes: [SerializableAttribute] public class ParentData{ [DataMember] public string Title{get;set;} } [DataContract] public class ChildData : ParentData{ [DataMember] public string Abstract{get;set;} } These two classes are served through a WCF service. However I only want the service to expose the ChildData class to the end user but pull the marked up DataMember properties from the parent. E.g. The consuming client would have a stub class that looked like: public class ChildData{ public string Title{get;set;} public string Abstract{get;set;} } If I uses the parent and child classes as above the stub class only contains the Abstract property. I have looked at using the KnownType attribute on the ChildData class like so: [DataContract] [KnownType(typeOf(ParentData)] public class ChildData : ParentData{ [DataMember] public string Abstract{get;set;} } However this didn't work. I then applied the DataContract attribute to the ParentData class, however this then creates two stub classes in the client application which I don't want. Is there any way to tell the serializer that it should flatten the inheritance to that of the sub-class i.e. ChildData

    Read the article

  • not able to register sip user on red5server, using red5phone

    - by sunil221
    I start the red5, and then i start red5phone i try to register sip user , details i provide are username = 999999 password = **** ip = asteriskserverip and i got --- Registering contact -- sip:[email protected]:5072 the right contact could be --- sip :99999@asteriskserverip this is the log: SipUserAgent - listen -> Init... Red5SIP register [SIPUser] register RegisterAgent: Registering contact <sip:[email protected]:5072> (it expires in 3600 secs) RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout RegisterAgent: Failed Registration stop try. Red5SIP Client leaving app 1 Red5SIP Client closing client 35C1B495-E084-1651-0C40-559437CAC7E1 Release ports: sip port 5072 audio port 3002 Release port number:5072 Release port number:3002 [SIPUser] close1 [SIPUser] hangup [SIPUser] closeStreams RTMPUser stopStream [SIPUser] unregister RegisterAgent: Unregistering contact <sip:[email protected]:5072> SipUserAgent - hangup -> Init... SipUserAgent - closeMediaApplication -> Init... [SIPUser] provider.halt RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout please let me know if i am doing anything wrong. regards Sunil

    Read the article

  • AJAX contact form in CodeIgniter

    - by Ross
    Few questions: I'm using CI and JQuery AJAX. In my code below, I assemble dataString, which by default, is appended to the URL as a query string. I've changed the AJAX "type" to POST, so my question is - how do I access dataString in my CI app? It would seem I still have to use $name=$this->input->post('name') Which to me, makes setting dataString redundant? -- I've tried searching but can't really find anything concrete. Would it be possible to still make use of CIs validation library and AJAX? if($this->form_validation->run() == FALSE) { // what can i return so that my CI app shows errors? } Normally you would reload the contact form or redirect the user. In an ideal world I would like the error messages to be shown to the user. Jquery: $(document).ready(function($){ $("#submit_btn").click(function(){ var name = $("input#name").val(); var company = $("input#company").val(); var email = $("input#email").val(); var phone = $("input#phone").val(); var message = $("textarea#message").val(); var dataString = 'name=' + name + '&message=' + message + '&return_email=' + email + '&return_phone=' + phone + '&company=' + company; var response = $.ajax({ type: "POST", url: "newsite/contact_ajax/", data: dataString }).responseText; //$('#contact').hide(); //$('#contact').html('<h5>Form submitted! Thank you!</h5><h4>We will be in touch with you soon.</h4>'); //$('#contact').fadeIn('slow'); return false; }); }); hope i've been clear enough - if anyone has a decent example of a CI contact form that would be great. there's mixed stuff on the internet but nothing that hits all the boxes. thanks

    Read the article

  • How to Get the F# Name of a Module, Function, etc. From Quoted Expression Match

    - by Stephen Swensen
    I continue to work on a printer for F# quoted expressions, it doesn't have to be perfect, but I'd like to see what is possible. The active patterns in Microsoft.FSharp.Quotations.Patterns and Microsoft.FSharp.Quotations.DerivedPatterns used for decomposing quoted expressions will typically provide MemberInfo instances when appropriate, these can be used to obtain the name of a property, function, etc. and their "declaring" type, such as a module or static class. The problem is, I only know how to obtain the CompiledName from these instances but I'd like the F# name. For example, > <@ List.mapi (fun i j -> i+j) [1;2;3] @> |> (function Call(_,mi,_) -> mi.DeclaringType.Name, mi.Name);; val it : string * string = ("ListModule", "MapIndexed") How can this match be rewritten to return ("List", "mapi")? Is it possible?

    Read the article

  • My application crashing Please help me out.

    - by kiran kumar
    My Application get crashing ... its loading data of all the cities... and when i click its displaying my detailed view controller.... when iam getting back from my controller... and selecting another city my application get crashed.. Please help me out. To get idea i am pasting my code. #import "CityNameViewController.h" #import "Cities.h" #import "XMLParser.h" #import "PartyTemperature_AppDelegate.h" #import "CityEventViewController.h" @implementation CityNameViewController //@synthesize aCities; @synthesize appDelegate; @synthesize currentIndex; @synthesize aCities; /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { // Custom initialization } return self; } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; self.title=@"Cities"; appDelegate=(PartyTemperature_AppDelegate *)[[UIApplication sharedApplication]delegate]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. return [appDelegate.cityListArray count]; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 95.0f; } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; cell.textLabel.textColor = [[[UIColor alloc] initWithRed:0.2 green:0.2 blue:0.6 alpha:1] autorelease]; cell.detailTextLabel.textColor = [UIColor blackColor]; cell.detailTextLabel.font=[UIFont systemFontOfSize:10]; if (indexPath.row %2 == 1) { cell.backgroundColor = [[[UIColor alloc] initWithRed:0.87f green:0.87f blue:0.87f alpha:1.0f] autorelease]; } else { cell.backgroundColor = [[[UIColor alloc] initWithRed:0.97f green:0.97f blue:0.97f alpha:1.0f] autorelease]; } } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; cell.selectionStyle= UITableViewCellSelectionStyleBlue; // cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; cell.backgroundColor=[UIColor blueColor]; } // aCities=[appDelegate.cityListArray objectAtIndex:indexPath.row]; // cell.textLabel.text=aCities.city_Name; cell.textLabel.text=[[appDelegate.cityListArray objectAtIndex:indexPath.row]city_Name]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ //http://compliantbox.com/party_temperature/citysearch.php?city=Amsterdam&latitude=52.366125&longitude=4.899171 NSString *url; aCities=[appDelegate.cityListArray objectAtIndex:indexPath.row]; if ([appDelegate.cityListArray count]>0){ url=@"http://compliantbox.com/party_temperature/citysearch.php?city="; url=[url stringByAppendingString:aCities.city_Name]; url=[url stringByAppendingString:@"&latitude=52.366125&longitude=4.899171"]; NSLog(@"url value is %@",url); [self parseCityName:[[NSURL alloc]initWithString:url]]; } } -(void)parseCityName:(NSURL *)url{ NSXMLParser *xmlParser=[[NSXMLParser alloc]initWithContentsOfURL:url]; XMLParser *parser=[[XMLParser alloc] initXMLParser]; [xmlParser setDelegate:parser]; BOOL success; success=[xmlParser parse]; if (success) { NSLog(@"Sucessfully parsed"); CityEventViewController *cityEventViewController=[[CityEventViewController alloc]initWithNibName:@"CityEventViewController" bundle:nil]; cityEventViewController.index=currentIndex; [self.navigationController pushViewController:cityEventViewController animated:YES]; [cityEventViewController release]; cityEventViewController=nil; } else { NSLog(@"Try it Idoit"); UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Alert!" message:@"Event Not In Radius" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [aCities release]; [super dealloc]; } @end And the error is * Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSMutableArray objectAtIndex:]: index 1 beyond bounds for empty array' ** Call stack at first throw:

    Read the article

  • Telerik RadGrid doesn't seem to export Grouped data

    - by SlackGadget
    Hi I've got a DNN application using Telerik RadGrid. We're exporting some data from the Grid but when we drill down on the grid control and export the data we only see the initial top level data, never the updated Grid. Here's my table tag and supporting code. I'm not an expert in ASPX/C#so please forgive my newbie-ness. <mastertableview autogeneratecolumns="False" datakeynames="AccountId" datasourceid="SqlDataSource1" groupsdefaultexpanded="False"> <DetailTables> <telerik:GridTableView runat="server" DataKeyNames="StatementId" DataSourceID="SqlDataSource2" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" > <DetailTables> <telerik:GridTableView runat="server" DataSourceID="SqlDataSource3" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" GroupsDefaultExpanded="False" ShowFooter="True" ShowGroupFooter="True" AllowMultiColumnSorting="True" GridLines="None"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="StatementId" MasterKeyField="StatementId" /> </ParentTableRelation> <AlternatingItemStyle BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> <FooterStyle BackColor="Yellow" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> </telerik:GridTableView> </DetailTables> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" /> </ParentTableRelation> <CommandItemSettings ExportToPdfText="Export to Pdf" /> <ExpandCollapseColumn Visible="True"> </ExpandCollapseColumn> </telerik:GridTableView> </DetailTables> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" /> </ParentTableRelation> <ExpandCollapseColumn Visible="True"> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ACCOUNTID" DataType="System.Int32" HeaderText="ACCOUNTID" SortExpression="ACCOUNTID" UniqueName="ACCOUNTID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ACCOUNTREF" HeaderText="ACCOUNTREF" SortExpression="ACCOUNTREF" UniqueName="ACCOUNTREF"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CUSTOMERID" DataType="System.Int32" HeaderText="CUSTOMERID" SortExpression="CUSTOMERID" UniqueName="CUSTOMERID"> </telerik:GridBoundColumn> </Columns> </mastertableview> The exports are registered with the script manager on load : protected void Page_Load(object sender, EventArgs e) { Button2.Enabled = Session[UserSelection.SelectedValue] != null ? true : false; ScriptManager.GetCurrent(Page).RegisterPostBackControl(Button3); ScriptManager.GetCurrent(Page).RegisterPostBackControl(Button4); } and I' calling the Export with the following : protected void Button3_Click(object sender, System.EventArgs e) { //ConfigureExport(); RadGrid1.Rebind(); RadGrid1.ExportSettings.FileName = "RadGridExportToExcel"; RadGrid1.ExportSettings.ExportOnlyData = true; RadGrid1.ExportSettings.OpenInNewWindow = true; RadGrid1.MasterTableView.ExportToExcel(); } Can anyone see what I'm missing, apart from DNN/ASPX experience and the will to live :)

    Read the article

  • Custom Android layout that handles its children

    - by Gromix
    Hi, I'm trying to create a custom Android control to emulate a LinearLayout with a fancier display. Basically, I want the exact behaviour of a LinearLayout, but also borders, a background, ... I could do it all in XML (works great) but since I have dozens of occurences in my app it's getting hard to maintain. I thought it would be nicer to have something like this: /* Main.xml */ <MyFancyLayout> <TextView /> <ImageView /> </MyfancyLayout> My problem is, I don't want to have to re-write LinearLayout, so is there a way to only change its appearance? I got as far as this, which doesn't work... can anyone think of a better approach? /* MyFancyLayout.xml */ <merge> ... the complex hierarchy to make it look like what I want ... with background attributes etc </merge> and /* MyFancyLayout.java */ public class MyFancyLayout extends LinearLayout { // inflate the XML // move all the real children (as given by main.xml) to the inflated layout // do I still need to override onMeasure and onLayout? } Cheers! Romain

    Read the article

  • How to scroll LI items in a fixed height UL?

    - by Tahir Akram
    Here is my example HTML. And I want to have scroll for my LI items. Which are of 2 levels. Means, I want to apply class on every UL. So how can I do that. By using JQuery or CSS tweaking. PS: I am using this example. <ul id="nav" class="dropdown"> <li class="dir"> Item_Root <ul> <li class="dir"> Item_1_Level <ul> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>.... up to N items</li> </ul> </li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>.... up to N items</li> </ul> </li> </ul>

    Read the article

  • Error occurs when I convert NSMutableArray to NSArray

    - by Ali
    Hi All, I want to convert NSMutableArray to NSArray to it gives error following is code ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook); CFIndex nPeople = ABAddressBookGetPersonCount(addressBook); tempPeoples=[[NSMutableArray alloc]init]; for(int i=0;i<nPeople;i++){ ABRecordRef i1=CFArrayGetValueAtIndex(allPeople, i); [tempPeoples addObject:i1]; // [peoples addObject:i1]; }// end of the for loop // Peoples is NSArray // peoples=[[NSArray alloc] initWithArray: tempPeoples]; peoples=[NSArray arrayWithArray:tempPeoples]; Please help

    Read the article

  • C/C++ Bit Array or Bit Vector

    - by MovieYoda
    Hi, I am learning C/C++ programming & have encountered the usage of 'Bit arrays' or 'Bit Vectors'. Am not able to understand their purpose? here are my doubts - Are they used as boolean flags? Can one use int arrays instead? (more memory of course, but..) What's this concept of Bit-Masking? If bit-masking is simple bit operations to get an appropriate flag, how do one program for them? is it not difficult to do this operation in head to see what the flag would be, as apposed to decimal numbers? I am looking for applications, so that I can understand better. for Eg - Q. You are given a file containing integers in the range (1 to 1 million). There are some duplicates and hence some numbers are missing. Find the fastest way of finding missing numbers? For the above question, I have read solutions telling me to use bit arrays. How would one store each integer in a bit?

    Read the article

  • Top 10 Vulnerabilidades de Seguridad en el WEB.CONFIG- PARTE 1

    - by Jason Ulloa
    Durante estos post, mostraré los 10 problemas o errores de configuración en el web.config que provocan grandes vulnerabilidades en las aplicaciones. Estos errores, en su mayoría vienen dados por desconocimiento a fondo del manejo de las secciones de configuración de nuestras aplicaciones. En esta primera parte, veremos los primeros 5 de ellos. 1. El modo Custom Errors Este es el primero de nuestra lista, ya que, será uno de los que casi siempre habilitemos cuando estamos desarrollando una aplicación web y que es de mucho cuidado. Una etiqueta común y vulnerable de esta configuración sería <configuration> <system.web> <customErrors mode="Off">   Una forma de corregir la vulnerabilidad que se expone a continuación sería cambiando la etiqueta por <configuration> <system.web> <customErrors mode="RemoteOnly">

    Read the article

  • TYPO3 unable to log in

    - by Agata
    Hi, My company prepared a new website based on typo3 (don't know the version but they started to prepare it in October 2011 so it's probably from that time. A couple of days ago I got my user name and password but I'm unable to log in (Itried withIE, Firefox and Chrome). Each time I try typo3 behaves like I'd be entering wrong user name orpassword (for sure I'm entering the right one, I also tried other user's data it ended up the same way). I use Windows 7 and Kaspersky Internet Security 9.0.0.736 - might their settings block typo3? I really don't know what to do and can't obtain help from the IT department (in head office in another country)... Thank you for any suggestions in advance.

    Read the article

  • Mapping tomcat apache worker

    - by metamorpheus
    I am running an Apache2 server connected with Tomcat5.5 Workers.properties workers.tomcat_home=/usr/share/tomcat5.5 workers.java_home=/usr/lib/jvm/java-6-sun ps=/ worker.list=worker1 worker.worker1.port=8009 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.lbfactor=1 The JkMount is defined as follows LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel debug JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkMount /jsp-examples worker1 JkMount /jsp-examples/* worker1 JkMount /servlets-examples worker1 JkMount /servlets-examples/* worker1 JkMount /tcontainer worker1 JkMount /tcontainer/* worker1 If i call 127.0.0.1/servlets-examples, i get the examples displayed and executed correctly. If i call [same server as above]/tcontainer, i get the following error: The requested resource (/tcontainer) is not available. (this is an error provided by tomcat5.5) How can i define where to get the sources? i have a configuration file in /usr/share/tomcat-5.5-webapps/tcontainer.xml: <Context path="/tcontainer" docBase="/var/www/web96/html/tcontainer" debug="0" privileged="true" allowLinking="true"> </Context> What did i forget to configure or what is wrong with my definitions? Thanks

    Read the article

  • MySQL error: Can't find symbol '_mysql_plugin_interface_version_' in library

    - by Josh Smith
    The boring, necessary details: I'm on Snow Leopard running MySQL locally. I'm trying to install the Sphinx engine for MySQL like so: mysql> install plugin sphinx soname 'sphinx.so'; ERROR 1127 (HY000): Can't find symbol '_mysql_plugin_interface_version_' in library I've Googled everywhere and can't seem to find an actual solution to this problem. For example this issue on the Sphinx forums seems unresolved. Someone else also raised this issue with similar results. The first post linked to an O'Reilly article which says: There is a common problem that might occur at this point: ERROR 1127 (HY000): Can't find symbol '_mysql_plugin_interface_version_' in library If you see a message like this, it is likely that you forgot to include the -DMYSQL_DYNAMIC_PLUGIN option when compiling the plugin. Adding this option to the g++ compile line is required to create a dynamically loadable plug-in. But the article ends on that point; I have no idea what this means or how to resolve the issue.

    Read the article

  • "Server not found" errors all over after Wordpress installation

    - by picardo
    I uploaded my Wordpress blog from my local machine to Slicehost and then pointed the domain name to the IP address. Then I installed the blog as normal. Once I went to wp-login.php to login, though, I started getting "Server not found" errors. That was strange because the server process was still running, and I checked many times. I can't see anything wrong in the error log, or the access log either. This doesn't only affect Wordpress. I can't access phpmyadmin either now, which was mapped to a subdirectory of the same domain address. What is going on? Can anyone help? Edit: the blog is located on a subdomain. It's still accessible from IP address. The virtual host configs are ServerName and ServerAlias, both set to blog.mysite.com. When I changed those and restarted apache, phpmyadmin came back. Edit: also it's not a propagation issue because I installed the blog from the domain name. It's only when I tried to log into the admin section, I started getting these errors.

    Read the article

  • How much packet loss is normal?

    - by Fabian
    I started monitoring our network using SmokePing. Users occasionally complain about bad network connections, but the problems went away after some minutes usually. I now wanted to get some more quantitative information about those problems. SmokePing regularly pings servers inside our network, in a connected network and outside hosts. I only have a limited amount of control over our internal network and none at all for the connection to the outside and to the second network. I now see quite often (2-4 times a day) that packets to the second network and the outside are dropped. Most of the times it is 1-2 packets out of 20, sometimes more. Inside our internal network no packets are dropped. Is this an expected amount of packet loss, or does it indicate that something is wrong? I'm mainly wondering if I should bother the university IT department about it, or if I should just accept it as it is.

    Read the article

  • When opening any file in excel, a 1 is added to ther name, and the default is to save a new copy…

    - by Chris
    Ok... I've searched a lot for this, but it's not an easy question to search for! When I open any files (xls, or xlsx) in Excel 2007, excel acts like it's a read only file, essentially creating a new file with the name plus a 1 on the end... Eg. I open NewDoc.xlsx Excel opens it as NewDoc1.xlsx and the save button brings up the save as dialogue in my default folder. Does anyone know how to set it back to allowing me to open, edit and save a document without having to browse to the original document and save over it!? My immediate thought was access permissions, but the file is in a network folder with my user given Full Control, I also tried creating a new file in that folder, and also on my local machine just in case - same result. To make it even stranger, if I browse to the original file using the save as dialogue, it will let me save over the original, without any further prompts.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >