Daily Archives

Articles indexed Saturday December 15 2012

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • ASP.NET Elements are null when assigning data source

    - by deccks
    For some reason, all of the objects in my ASP.NET markup are now null when I try to assign values to their properties in the code behind. My project was going fine and then now when I try to assign a data source to a GridView, I get a null reference error. I have no idea why it's doing this. I am not doing nothing special. I am just trying to assign a value to a property to an asp.net element in on the page. The intellisense knows that the element is there and I get no errors when I build the project. It's just when I am running the website I get the null reference. I have been trying to fix this issue for a couple weeks now. Please Help. Thanks. Here is the code: protected void Page_PreRender(object sender, EventArgs e) { LoadData(); } private void LoadData() { Entities context = new Entities(); var types = (from t in context.CustomerTypes select t).OrderBy(t => t.TypeName); gvCustomerTypes.DataSource = types; gvCustomerTypes.DataBind(); } and on in the markup the gridview looks like this: <asp:GridView ID="gvCustomerTypes" runat="server" ShowHeader="true" GridLines="Both" AutoGenerateColumns="false" AlternatingRowStyle-BackColor="AliceBlue" Width="100%"> <Columns> <asp:TemplateField HeaderText="Customer Type Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <ItemTemplate> <asp:Label ID="lblType" runat="server" Text='<%# Eval("TypeName") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" NavigateUrl='<%#Eval("CustomerTypeID", "CreateEditCustomerType.aspx?ID={0}") %>' Text="Edit" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" CommandName='<%#Eval("CustomerTypeID") %>' OnClientClick="javascript:return confirm('Are you sure you want to delete this Customer Type?');" OnCommand="DeleteCustomerType" Text="Delete" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>

    Read the article

  • Tabbed application troubles in xcode

    - by trludt
    I am working with my first tabbed application in xcode. I am just testing with some stuff since I'm relatively new to programming. I am just using the 2 views already put into the template. I am putting a slider into the first view and am going to attach it to a text box with numbers. But that isn't the problem! This is probably really stupid and simple, but when i run the application just to see the stuff on the simulator, it is just showing a black screen. NO CLUE WHY! But its killing me and would love some help!

    Read the article

  • Add a List<object> to EF

    - by Billdr
    I'm playing around with EF, trying to get my bearings. Right now I'm writing a blackjack game for a website. The problem is that my whenever I pull a GameState from the database, the playerHand, dealerHand, theDeck, and dealerHidden properties are null. public class GameState { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int gameSession { get; set; } public int playerScore { get; set; } public int dealerScore { get; set; } public Deck theDeck { get; set; } public List<Cards> playerHand { get; set; } public List<Cards> dealerHand { get; set; } public Cards dealerHidden { get; set; } public bool gameOver { get; set; } } public class Cards { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int cardId { get; set; } public string cardName { get; set; } public int cardValue { get; set; } } public class GameStateContext : DbContext { public GameStateContext() : base("MyContext") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity<GameState>().HasRequired(e => e.theDeck); modelBuilder.Entity<GameState>().HasRequired(e => e.dealerHand).WithMany().WillCascadeOnDelete(false); modelBuilder.Entity<GameState>().HasRequired(e => e.playerHand).WithMany().WillCascadeOnDelete(false); modelBuilder.Entity<GameState>().HasOptional(e => e.dealerHidden); modelBuilder.Entity<Deck>().HasRequired(e => e.cards).WithMany().WillCascadeOnDelete(false); base.OnModelCreating(modelBuilder); } public DbSet<GameState> GameStates { get; set; } public DbSet<Deck> Decks { get; set; } public DbSet<Card> Cards { get; set; } } The cards and deck table are populated. Where am I going wrong?

    Read the article

  • Iterative Reduction to Null Matrix

    - by user1459032
    Here's the problem: I'm given a matrix like Input: 1 1 1 1 1 1 1 1 1 At each step, I need to find a "second" matrix of 1's and 0's with no two 1's on the same row or column. Then, I'll subtract the second matrix from the original matrix. I will repeat the process until I get a matrix with all 0's. Furthermore, I need to take the least possible number of steps. I need to print all the "second" matrices in O(n) time. In the above example I can get to the null matrix in 3 steps by subtracting these three matrices in order: Expected output: 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 I have coded an attempt, in which I am finding the first maximum value and creating the second matrices based on the index of that value. But for the above input I am getting 4 output matrices, which is wrong: My output: 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 My solution works for most of the test cases but fails for the one given above. Can someone give me some pointers on how to proceed, or find an algorithm that guarantees optimality? Test case that works: Input: 0 2 1 0 0 0 3 0 0 Output 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0

    Read the article

  • Finding comma separated values with a colon delimiter

    - by iconMatrix
    I am setting values in my database for tourneyID,Selected,Paid,Entered,date then separating each selection with a colon So I have a string that may look like this 187,S,,,09-21-2013:141,S,,,06-21-2013:144,S,,,05-24-2013 but it also could look like this 145,S,,,07-12-2013:142,S,,,05-24-2013:187,S,,,09-21-2013 and some times is looks like this 87,S,,,07-11-2013:125,S,,,06-14-2013 I am trying to find this sequence: 187,S,,,09-21-2013 I have data stored like that because I paid a programmer to code it for me. Now, as I learn, I see it was not the best solution, but it is what I have till I learn more and it is working. My problem is when using LIKE it returns both the 187 and 87 values $getTeams = mysql_query("SELECT * FROM teams WHERE (team_tourney_vector LIKE '%$tid,S,P,,$tourney_start_date%' OR team_tourney_vector LIKE '%$tid,S,,,$tourney_start_date%') AND division='$division'"); I tried this using FIND_IN_SET() but it would only return the the team id for this string 187,S,,,09-21-2013:141,S,,,06-21-2013:144,S,,,05-24-2013 and does not find the team id for this string 145,S,,,07-12-2013:142,S,,,05-24-2013:187,S,,,09-21-2013 SELECT * FROM teams WHERE FIND_IN_SET('187',team_tourney_vector) AND (team_tourney_vector LIKE '%S,,,09-21-2013%') Any thoughts on how to achieve this?

    Read the article

  • Delete Entity in Many to Many Relation. Don't get error but entity is not deleted

    - by Shapper
    I have, in EF5, two entities: User and Role. Between User and Role there is a many to many relation. I don't have an entity for the UserRoles database which sets the relation. I have a User and I want to delete a role without loading it from the database. Context context = new Context(); User user = context.Users.First(x => x.Id == 4); user.Roles = new List<Role>(); Role role = new Role { Id = 20 }; context.Roles.Attach(role); user.Roles.Remove(role); context.SaveChanges(); I don't get any error but the role is not removed. Any idea why? Thank you, Miguel

    Read the article

  • Parsing html output and executing javascript

    - by user1841964
    I have this function: function parseScript(_source) { var source = _source; var scripts = new Array(); while(source.indexOf("<script") > -1 || source.indexOf("</script") > -1) { var s = source.indexOf("<script"); var s_e = source.indexOf(">", s); var e = source.indexOf("</script", s); var e_e = source.indexOf(">", e); scripts.push(source.substring(s_e+1, e)); source = source.substring(0, s) + source.substring(e_e+1); } for(var i=0; i<scripts.length; i++) { try { eval(scripts[i]); } catch(ex) { } } return source; } It parses and execute Javascript wonderfully except the when in <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> the src file never gets executed.

    Read the article

  • Apply dynamic list of templates to an argument

    - by Diego Martinez
    I need apply a variable sequence of templates to an argument. example 1: arg:tpl1():tpl2():...:tplN() Suppose that i have other multi valued argument, and each value is the name for a dynamic template invocation. ¿What is the better form of apply all the templates from the list to my argument? tplNames : {name | <(name)(arg)>} not works, just apply a template ever to the same innitial value of my argument, i need the same result of example 1 but in a dynamic way. Thank you!!

    Read the article

  • Logging in to website with saved username and password

    - by DGund
    One of the functions of an app I am making involves logging the user into our Campus Portal website. For ease of use, the user may enter a username and password into the app once, and it will be saved for all future log-ins. When the user clicks a button, the information will automatically be sent to log in, and the website will be displayed in a UIWebView. Let us say that the username and password are each stored in an NSString. How can I use this data to log in to this website programmatically and display the page it in a UIWebView? I know little about posting and forms, so any help is appreciated. Would something like this Stackoverflow answer help? Here's the shell of my code for this - (IBAction)btnGo:(id)sender { username = usernameField.text; password = passwordField.text; if (saveSwitch.isOn) { //Save data if the user wants AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; usernameSaved = username; passwordSaved = password; [appDelegate.listOfPortalCredentials replaceObjectAtIndex:0 withObject:usernameSaved]; [appDelegate.listOfPortalCredentials replaceObjectAtIndex:1 withObject:passwordSaved]; } //Insert username and password to web form, log in to portal //This is where I need help }

    Read the article

  • Django-ckeditor inline error

    - by ad3w
    I'm using FeinCMS (https://github.com/feincms/feincms/) and django-ckeditor with file upload support (https://github.com/shaunsephton/django-ckeditor). I create a FeinCMS content type for RichTextField: class RichContent(models.Model): text = RichTextField(_('text')) class Meta: abstract = True verbose_name = _('Rich Text') verbose_name_plural =_('Rich Text') def render(self, **kwargs): context_instance = kwargs.get('context_instance') return render_to_string('content/page/rich_content.html', { 'page': self, }, context_instance=context_instance) But in Django admin, when i select 'Rich Text' and press 'Go', get this error in firebug console: uncaught exception: [CKEDITOR.editor] The instance "id_richcontent_set-__prefix__-text" already exists. And textarea in ckeditor do not editable.

    Read the article

  • How do I read and traverse inodes

    - by Eric Fossum
    I've opened the super-block and group descriptor in an EXT2 filesystem, but I don't know how to read for instance the root directory or files in it... Here's some of what i got fd=open("/dev/sdb2", O_RDONLY); lseek(fd, SuperSize, SEEK_SET); read(fd, &super_block, SuperSize); lseek(fd, 4096, SEEK_SET); read(fd, &groupDesc, DescriptSize); but this next part doesn't seem to work... lseek(fd, super_block.s_log_block_size*groupDesc.bg_inode_table, SEEK_SET); lseek(fd, InodeSize*(EXT2_ROOT_INO-1), SEEK_CUR); read(fd, &root, InodeSize);

    Read the article

  • Add button to a layout programmatically

    - by mmmbaileys
    I'm having trouble adding a button to a layout that I've created in XML. Here's what I want to achieve: //some class else { startActivity(new Intent(StatisticsScreen.this, ScreenTemperature.class)); } //// //ScreenTemperatureClass @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //this is where I call another class that //displays a nice graph setContentView(new GraphTemperature(getApplicationContext())); } I want to add a Button to this new screen so that it'll appear below the graph. I've tried creating a LinearLayout view, then create a Button and add it to this view but I just get NullPointerExceptions.. Any help would be appreciated. Thanks EDIT#1 Here's what I've tried using that created a NullPointerException and 'force close': Button buybutton; LinearLayout layout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new GraphTemperature(getApplicationContext())); layout = (LinearLayout) findViewById(R.id.statsviewlayout); Button buyButton = new Button(this); buyButton.setText(R.string.button_back); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); layout.addView(buyButton); } And here's the logcat error: ERROR/AndroidRuntime(293): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.weatherapp/com.weatherapp.ScreenTemperature}: java.lang.NullPointerException ERROR/AndroidRuntime(293): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) ERROR/AndroidRuntime(293): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) ERROR/AndroidRuntime(293): at android.app.ActivityThread.access$2300(ActivityThread.java:125) ERROR/AndroidRuntime(293): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) theres abviously more lines to do with this error in logcat, not sure if you want it? EDIT#2 So i tried bhups method: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GraphTemperature GT = new GraphTemperature(getApplicationContext()); layout = (LinearLayout) findViewById(R.id.statsviewlayout); Button buyButton = new Button(this); buyButton.setText(R.string.button_back); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); layout.addView(GT); // line 27 layout.addView(buyButton); setContentView(layout); } This method produced the same logcat error as above, NullPointerException, indicating it was something to do with line no. 27 which is the layout.addView line of code. Any ideas? Thanks again

    Read the article

  • Samba 4 or Active Directory

    - by Jon Rhoades
    Now that Samba 4 has finally been released we find ourselves in new position of having a choice of of either upgrading our Samba 3 domain to either a Samba 4 domain on Linux or a Windows AD domain on Windows 2012. Given that we are equally expert at managing Windows and Linux servers, is there any reason not to use Samba 4 over AD on Windows; specifically: Are there functional differences from a Windows/OS X client perspective? Are there issues with other services that use AD, such as storage appliances that use AD/Kerberos for authentication/authorisation. Will the Microsoft "System Centre" suite of tools and other similar products work seamlessly? How will Samba 4 handle AD's Multimaster DC model and FMSO roles. Are there any other issues to be aware of, such as vendor support?

    Read the article

  • Dynamic Virtual Hosts In Apache with www and non-www subdomains

    - by haukish
    I don't know apache very well and I've got a problem with configure mod_vhost_alias This is my httpd.conf file: UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon <Directory /var/www/sites/> Options FollowSymLinks AllowOverride All </Directory> <VirtualHost *:80> CustomLog logs/access_log.sites vcommon ServerAlias *.domain.com UseCanonicalName Off VirtualDocumentRoot /var/www/sites/%1/ </VirtualHost> Subdomains work fine without www. but I need to make them work with www too. Here's an example: something.domain.com - site is loading www.something.domain.com - Not Found What should I do?

    Read the article

  • Cannot SSH into Virtual Machine

    - by MasterGberry
    I am running a CentOS VM on my desktop that I use for development testing when coding in python. At my school I have a dedicated IP setup for the VM and my desktop so I never seem to have an issue ssh'ing from desktop into VM. I am now at home for winter break and cannot seem to SSH into the VM using the local ip address behind my router, the external IP with port 22 forwarded to my VM, or anything. Strangely enough I can ssh into my production server and then fromt here ssh into the VM, but not from my desktop to the VM directly What should I do to get this to work? Thanks

    Read the article

  • Why doens't my Postgres user have permissions to add a Postgres database?

    - by orokusaki
    First, I ran: sudo su postgres createuser -U postgres foouser -P which worked fine, and I ran: createdb -U foouser -E utf8 -O foouser foodatabase -T template0 and got "permission denied: cannot create database" Firstly, should I even su as postgres to do operations like the first one (assuming my postgres data dir is owned by postgres), or is -U postgres from any user (assuming trust is used in pg_hba.conf) sufficient? Secondly, why am I running into this error? Is this because the user foouser is a non-superuser? Should I create foodatabase using the postgres user and simply -O foouser?

    Read the article

  • sharing a USB printer in SOHO environment [migrated]

    - by Registered User
    Here is a situation I am facing, there is USB printer which works only on a Windows XP machine, there are other devices in LAN it is a Small Office Home Office environment. How can this USB printer attached to Windows XP machine be shared so that other laptops or users in Network who have Windows 7 or Linux on their laptops can use this printer. The printer model number is Canon Laser Shot LBP-1210 http://www.canon-europe.com/For_Home/Product_Finder/Printers/Laser/LaserShot_LBP1210/index.asp a print server is not available to me I need to make it work in this situation only.What can I do? the clients are unable to connect to this.It is not a network or TCP/IP printer If a from Windows 7 machine some one wants to use this printer so that he can take a print he gets an error while adding the printer to his machine which is a Windows 7 machine (where as the printer is USB printer on Windows XP machine) Start--->Devices and Printers---> Add Printer---> Find Printer by name or IP address--->Selected a shared printer by name-->\\PC-Name-printer3 and select browse it gives a message Windows can not find a driver for Canon LASER SHOT LBP-1210 on the network what does this mean do I need to install some kind of software at client machine or on the machine where printer is present?

    Read the article

  • cause for mysql crash

    - by user1322092
    A cron job automatically restarted my mysql database. What's the cause for the crash, or can you suggest how to resolve or monitor. I would REALLY appreciate your input. 120715 14:38:58 mysqld started 120715 14:38:58 InnoDB: Started; log sequence number 0 411137570 120715 14:38:58 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 120715 15:14:21 [Note] /usr/libexec/mysqld: Normal shutdown 120715 15:14:23 InnoDB: Starting shutdown... 120715 15:14:25 InnoDB: Shutdown completed; log sequence number 0 411166467 120715 15:14:25 [Note] /usr/libexec/mysqld: Shutdown complete 120715 08:14:25 mysqld ended 120715 08:14:26 mysqld started 120715 8:14:26 InnoDB: Started; log sequence number 0 411166467 120715 8:14:26 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 121212 09:15:32 mysqld started InnoDB: The log sequence number in ibdata files does not match InnoDB: the log sequence number in the ib_logfiles! 121212 9:15:58 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 121212 9:17:28 InnoDB: Started; log sequence number 0 554145193 121212 9:17:57 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Read the article

  • libvirt upgrade caused vms to not see drives (boot media not found)

    - by bias
    I upgraded to Ubuntu 12.04.1 and now libvirt (via open nebula) successfully runs vms but they aren't finding the 2 drives (specifically, the boot drive). One is "hd" the other is "cdrom". The machine boots but fails and displays something like "boot media not found hd" (this was in a vnc terminal and I didn't copy the output anywhere so that's not the verbatim message). I tried constructing a new disk using the new version of qemu (via vmbuilder) and this new machine has the same problem as the old machine. In case it matters (I can't see why it would) I'm using open nebula to manage the machines. There's nothing relevant in any of the logs: syslog, libvirtd, oned. Which is to say nothing interesting/anomalous is reported when the machine is brought up. Versions libvirt 0.9.8-2ubuntu17.4 qemu-kvm 1.0+noroms-0ubuntu14.3 The libvirt xml config portions (relavent) <os> <type arch='x86_64' machine='pc-1.0'>hvm</type> <boot dev='hd'/> </os> ... <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/one//203/images/disk.0'/> <target dev='sda' bus='scsi'/> <alias name='scsi0-0-0'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/one//203/images/disk.1'/> <target dev='sdc' bus='scsi'/> <readonly/> <alias name='scsi0-0-2'/> <address type='drive' controller='0' bus='0' unit='2'/> </disk> <controller type='scsi' index='0'> <alias name='scsi0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </memballoon> ... </devices> The libvirt/qemu log contains 2012-11-25 22:19:24.328+0000: starting up LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 256 -smp 1,sockets=1,cores=1,threads=1 -name one-204 -uuid 4be6c276-19e8-bdc2-e9c9-9ca5352f2be3 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/one-204.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device lsi,id=scsi0,bus=pci.0,addr=0x5 -drive file=/var/lib/one//204/images/disk.0,if=none,id=drive-scsi0-0-0,format=qcow2 -device scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,bootindex=1 -drive file=/var/lib/one//204/images/disk.1,if=none,media=cdrom,id=drive-scsi0-0-2,readonly=on,format=raw -device scsi-disk,bus=scsi0.0,scsi-id=2,drive=drive-scsi0-0-2,id=scsi0-0-2 -netdev tap,fd=18,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=02:00:c0:a8:00:68,bus=pci.0,addr=0x3 -netdev tap,fd=19,id=hostnet1 -device rtl8139,netdev=hostnet1,id=net1,mac=02:00:ad:f0:1b:94,bus=pci.0,addr=0x4 -usb -vnc 0.0.0.0:204 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 kvm: -device rtl8139,netdev=hostnet0,id=net0,mac=02:00:c0:a8:00:68,bus=pci.0,addr=0x3: pci_add_option_rom: failed to find romfile "pxe-rtl8139.rom" kvm: -device rtl8139,netdev=hostnet1,id=net1,mac=02:00:ad:f0:1b:94,bus=pci.0,addr=0x4: pci_add_option_rom: failed to find romfile "pxe-rtl8139.rom"

    Read the article

  • Connecting to MySQL Server from PHP Command Line (MAMP)

    - by Austin White
    First of all, I'm using Mac OSX 1.6, MAMP 1.9, PHP 5.3.4, and MySQL 5.1.44. I'm in the process of setting up a video encoding service for a site using Chris Boulton's PHP-Resque and Redis. Once the worker process is fired and the videos have been encoded, I need to save their locations to a mysql database. The php script is being run from the shell, so that is where the issue begins. I import the mysql settings and when it attempts to connect, I get the following errors: Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/austingym/Documents/Dropbox/Website/htdocs/homefree/lib/MySQLi_Extended.class.php on line 24 Warning: mysqli::mysqli(): [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servn (trying to connect via tcp://MYSQL_SERVER:3306) in /Users/austingym/Documents/Dropbox/Website/htdocs/homefree/lib/MySQLi_Extended.class.php on line 24 Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/austingym/Documents/Dropbox/Website/htdocs/homefree/lib/MySQLi_Extended.class.php on line 24 Warning: mysqli::set_charset(): Couldn't fetch MySQLi_Extended in /Users/austingym/Documents/Dropbox/Website/htdocs/homefree/lib/MySQLi_Extended.class.php on line 32 I realize that the error is occurring because it's trying to connect to tcp://MYSQL_SERVER:3306, when MySQL is on port 8889. I've been reading about Mac OSX and MAMP errors regarding the mysql.sock and I've gone through multiple forums and tried various fixes, but none have worked. I've tried PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php5.3/bin/:/opt/local/bin:/opt/local/sbin:$PATH and sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock but neither have worked. I even ran a search on my machine for "3306" to find where it's being set, but because that's the normal default, I'm guessing it's not being set explicitly. Any clues on how to fix this rather challenging error?

    Read the article

  • Samba4 advice for production use

    - by pgb
    I have an old Samba 3 + LDAP server installed that needs to be rebuilt. I'm weighting my options, and Windows Server seems too expensive at the moment, and Samba 4 appeared to be a nice option, coupled with the last Bind 9 that can dynamically add the computers to the DNS. I have about 30 workstations, so I still consider it a small network. My questions are: Is Samba 4 stable enough for production? It seems as if the Samba team is too cautious on when to call their version final, or even beta, as compared with other open source projects. What Linux distribution would you recommend to set it up? I usually use Ubuntu Server, but may use another one if installing / maintaining Samba 4 is better on that one.

    Read the article

  • Squid3 not working. Access denied

    - by Nitish
    I installed SQUID3 on a Linux machine with two ethernet interfaces (eth0 and eth1). I used the default settings in the squid.conf file and uncommented the two lines acl localnet src 192.168.0.0/16 and http_access allow localnet. eth0 is connected to a router, which provides Internet access. It is assigned an IP 192.168.1.2 by the router. I manually configured eth1 to have an IP address 192.168.5.1. It is connected to a switch. Systems having IP addresses 192.168.5.x are connected to this switch. I ran these two commands for NAT: iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.5.1:3128 iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 But when I try to access internet from a system having IP 192.168.5.2 through the proxy I get an error that says "Access denied". What is wrong with my configuration?

    Read the article

  • Issues connecting VMWare VM to Windows 7 (host)

    - by MasterGberry
    I am on windows 7 trying to figure out why i cannot ping my computer or my VM from the other one, yet I am able to ping the router on both and other computers on the network. My desktop is running windows 7 64 bit and my vm is running CentOS 64 bit (which is what I use to test my web server stuff). At my school the VM has a dedicated IP and i don't have this issue, but I am home now and having issues trying to set this up behind my dumb router...I had already tried changing the VINC (i believe) to hide the vmnet1 and vmnet8 connections from the windows firewall and this seemed to have worked for like 5 minutes and then stopped... Any ideas? Thanks

    Read the article

  • How to tell Windows 7 "sleep when laptop is closed, unless there's an external monitor connected; then use that"?

    - by Josh
    Most of the time, I would like my Windows 7 laptop to sleep when I close it. But sometimes, I like to connect an external monitor over DVI. I would like my laptop to use the external monitor when I close the lid, but only when a monitor is connected to the DVI port. Otherwise, sleep when closed. Is there any way I can do that, without manually changing the power settings every time I decide to use the monitor?

    Read the article

  • Improve performance on Lync desktop sharing

    - by Trikks
    I'm using Lync 2010 server to handle some clients communication and screen sharing. The biggest issue is the performance with screen sharing, it is of rather high quality but the frame rate is very poor. I have been reading and searching a lot on the subject and 95% of all topics is about bandwidth, we have a 200/200 MBit Internet connection solely for this application. Also my test machines runs on an internal gigabit lan. The speeds between all boxes is hysterically fast. Next step was to ensure that there where some profiles for different bandwidths, so i registered some New-CsNetworkBandwidthPolicyProfile -Identity 50Mb_Link -Description "BW profile for 50Mb links" -AudioBWLimit 20000 -AudioBWSessionLimit 200 -VideoBWLimit 14000 -VideoBWSessionLimit 700 New-CsNetworkBandwidthPolicyProfile -Identity 100Mb_Link -Description "BW profile for 100Mb links" -AudioBWLimit 30000 -AudioBWSessionLimit 300 -VideoBWLimit 25000 -VideoBWSessionLimit 1500 Nothing fancy happend here either. Non of the test boxes have anything from Norton installed, they doesn't have any firewalls running (nor does the Lync server), all fences are down in this environment just for the testing. Is there any thing that I may have missed to improve the quality of this? Thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >