text:
Q: How do I check if my network card has been detected and is working? Hello I am using Ubuntu 10, and am having problems with getting connected to wired internet. Normally when I connect a cable to my computer, the port would have a green and yellow light flashing. But now I only have the green on flashing once in a while. So I actually want to know if my network card has been detected.
eth0      Link encap:Ethernet  HWaddr 18:a9:05:22:cd:f9
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:28 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:26:82:3c:ac:27
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-26-82-3C-AC-27-00-00-00-00-00-00-00-00-00-00
          UP RUNNING  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

This is what is displayed when I do ifconfig, but it isn't giving me any address.

A: Check if you can get out onto the net:
    ping google.com
If this fail's a few things could be happening.
As other's have said though, ifconfig will get you device details.
ifconfig

This should display something like:
eth0      Link encap:Ethernet  HWaddr AA:22:DD:CC:EE:FE
      inet addr:121.121.128.120  Bcast:128.146.128.255  Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:28834210 errors:0 dropped:0 overruns:0 frame:0
      TX packets:34965403 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:17051041467 (15.8 GiB)  TX bytes:4435012315 (4.1 GiB)
      Memory:fc200000-fc220000

lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:6450 errors:0 dropped:0 overruns:0 frame:0
      TX packets:6450 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:2266926 (2.1 MiB)  TX bytes:2266926 (2.1 MiB)

Notice how I have an inet addr defined.  If you do not have an IP address then something is wrong.
If this is the case... most likely it would be a DHCP problem.  Are you using network manager or anything to "manage" your network?
Can you ping 192.168.1.1 or ping 10.0.0.1?  (Most likely your router's LAN ip is one of those)
If you can ping one of those, then you can see your router and you are not getting a IP from the router.  This could be either your router DHCP not configured/setup or your system not requesting an IP from the router.
That is if you have a router.
Last thing to do:
ifdown eth0
ifup eth0

A: Open a terminal window and type ifconfig.  You should see an entry for eth0 which is your (first) hardwired Ethernet port.  If it is working, (and DHCP is enabled) it should have an IP address assigned and you will see RX/TX packet activity.

A: If the failure immediately followed a re-install, the likely place to look is in the new installation's network setup.  A quick test to confirm that would be to try connecting to a known-working router, and try connecting to your switch from another, known-working computer.  Either of those tests whether the failure in your OS or upstream of it.

A: Your question is a little unclear, but you can check to see if your hardware has been detected with the command "lspci". If is isn't already installed, its available in the "pciutils" package.
If you see something like this:
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 7c)

Then your hardware has been detected.
The check for link detection, I use ethtool.
root@pro-38-gl:/home/albertlash# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000001 (1)
Link detected: yes

Though mii-tool will work as well.


text:
Q: Reliability for FTP Server We have a Ftp server implemented. The manager wants to add reliability to it. He wants me to write incoming streams into some fast and reliable system (like hbase or redis) before writing them to server's hard disk. His point is if server has crashed (e.g power failure) before storing file, we have one copy of it in reliable system.
But I believe this method is redundant and useless because if we want to persist client file, we can simply write it into disk in first place. It also makes ftp server slow (because it needs to write data into two different place).
So am I wrong or he is? And if I'm wrong what is the best solution to use as reliability back-end?

A: It is redundant and useless.
If the server crashes during a file transfer, you will at best have half a file, which will in most situations not be much better than no file at all. The only situation where this configuration could help, is one where a crash happens between receiving the last byte and writing it to disk. Assuming that you are streaming files to disk while receiving them (as opposed to storing them in a buffer and writing them after the transfer is completed, but that would be stupid, because it would easily result in memory exhaustion when multiple large files are uploaded at the same time), we are talking about milliseconds here (microseconds with SSDs).
You can further reduce that time-window by having the FTP server store files on a SAN or NAS disk via network. Most of these systems will cache filestreams in memory before writing them to disk, which means that they will behave pretty much like the proposed in-memory databases.
This plan will in fact reduce reliability, because with hbase/redis you have another component in the system which can potentially fail or cause bugs.
But what you could propose as a compromise is:

*

*The ability to store received files in multiple file locations simultaneously for redundancy. Admins can configure as many locations as they want.

*Adapters for treating redis/hbase as file locations

That way your manager could set up a configuration which writes files both to redis/hbase and the filesystem (as pointless as that might be from a reliability perspective), while saner people would get two useful other features:

*

*Have your FTP server replicate to offsite location(s) automatically, for example an offsite backup location or a global content distribution network

*Use your FTP server as a middleware for dumping files directly into their favorite NoSQL database without the detour via a "normal" filesystem. This could be useful for integrating a system which only speaks FTP with a NoSQL database.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Apache-Ignite integration as Hibernate 2nd level cache breaking? I am trying to set Apache Ignite as the second level Hibernate cache provider in my project but i am getting a strange exception.
Configurations are as below:

*

*POM.xml

Added
<spring.version>4.3.0.RELEASE</spring.version>
<hibernate.version>4.3.8.Final</hibernate.version>
<ignite.version>1.6.0</ignite.version>
<ignite.version.hibernate>1.0.0</ignite.version.hibernate>

    <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-core</artifactId>
        <version>${ignite.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-spring</artifactId>
        <version>${ignite.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-hibernate</artifactId>
        <version>${ignite.version.hibernate}</version>
    </dependency>

*Spring Hibernate Configuration file
<!-- Hibernate SessionFactory -->
<bean id="sessionFactoryHibernate" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
    <props>
        <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
        <prop key="hibernate.hbm2ddl.auto">true</prop>
        <prop key="hibernate.format_sql">true</prop>
        <prop key="hibernate.show_sql">true</prop>
        <prop key="hibernate.cache.use_query_cache">true</prop>
        <prop key="hibernate.generate_statistics">true</prop>
        <prop key="hibernate.cache.use_second_level_cache">true</prop>
        <prop key="hibernate.cache.region.factory_class">org.apache.ignite.cache.hibernate.HibernateRegionFactory</prop>
        <prop key="org.apache.ignite.hibernate.grid_name">hibernate-grid</prop>
        <prop key="org.apache.ignite.hibernate.default_access_type">READ_ONLY</prop>
    </props>
</property>
<property name="packagesToScan" value="com.entity"></property>

*ignite-configuration.xml

    <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- Basic configuration for atomic cache. -->
    <bean id="atomic-cache" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
    <property name="cacheMode" value="PARTITIONED"/>
    <property name="atomicityMode" value="ATOMIC"/>
    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
    </bean>

    <!-- Basic configuration for transactional cache. -->
    <bean id="transactional-cache" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
    <property name="cacheMode" value="PARTITIONED"/>
    <property name="atomicityMode" value="TRANSACTIONAL"/>
    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
    </bean>

    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
    <!--
        Specify the name of the caching grid (should correspond to the
        one in Hibernate configuration).
    -->
    <property name="gridName" value="hibernate-grid"/>

    <!--
        Specify cache configuration for each L2 cache region (which corresponds
        to a full class name or a full association name).
    -->
    <property name="cacheConfiguration">
        <list>
            <!--
                Configurations for entity caches.
            -->
<!--             <bean parent="transactional-cache">
                <property name="name" value="com.mycompany.MyEntity1"/>
            </bean>
            <bean parent="transactional-cache">
                <property name="name" value="com.mycompany.MyEntity2"/>
            </bean>
            <bean parent="transactional-cache">
                <property name="name" value="com.mycompany.MyEntity1.children"/>
            </bean>
  -->
            <!-- Configuration for update timestamps cache. -->
            <bean parent="atomic-cache">
                <property name="name" value="org.hibernate.cache.spi.UpdateTimestampsCache"/>
            </bean>

            <!-- Configuration for query result cache. -->
            <bean parent="atomic-cache">
                <property name="name" value="org.hibernate.cache.internal.StandardQueryCache"/>
            </bean>
        </list>
    </property>

    </bean>

    </beans>

*Entity Class

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "USER_TYPE", indexes = {
      @Index(columnList = "TYPE_SHORT_NAME", name = "TYPE_SHORT_NAME_UNIQUE_idx", unique = true), })
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY, region = "userType")

public class UserType implements Serializable {

  private static final long serialVersionUID = -628308304752474026L;

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(name = "USER_TYPE_ID")
  private int userTypeId;

  @Column(name = "TYPE_SHORT_NAME", length = 20, nullable = false)
  private String typeShortName;

  @Column(name = "TYPE_LONG_NAME", length = 255)
  private String typeLongName;

  public UserType() {
  }

  public UserType(int userTypeId, String typeShortName, String typeLongName) {
      this.userTypeId = userTypeId;
      this.typeShortName = typeShortName;
      this.typeLongName = typeLongName;
  }

  @Override
  public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((typeLongName == null) ? 0 : typeLongName.hashCode());
      result = prime * result + ((typeShortName == null) ? 0 : typeShortName.hashCode());
      result = prime * result + userTypeId;
      return result;
  }

  @Override
  public boolean equals(Object obj) {
      if (this == obj)
          return true;
      if (obj == null)
          return false;
      if (!(obj instanceof UserType))
          return false;
      UserType other = (UserType) obj;
      if (typeLongName == null) {
          if (other.typeLongName != null)
              return false;
      } else if (!typeLongName.equals(other.typeLongName))
          return false;
      if (typeShortName == null) {
          if (other.typeShortName != null)
              return false;
      } else if (!typeShortName.equals(other.typeShortName))
          return false;
      if (userTypeId != other.userTypeId)
          return false;
      return true;
  }

  @Override
  public String toString() {
      return "UserType [userTypeId=" + userTypeId + ", typeShortName=" + typeShortName + ", typeLongName="
              + typeLongName + "]";
  }

  public int getUserTypeId() {
      return userTypeId;
  }

  public void setUserTypeId(int userTypeId) {
      this.userTypeId = userTypeId;
  }

  public String getTypeShortName() {
      return typeShortName;
  }

  public void setTypeShortName(String typeShortName) {
      this.typeShortName = typeShortName;
  }

  public String getTypeLongName() {
      return typeLongName;
  }

  public void setTypeLongName(String typeLongName) {
      this.typeLongName = typeLongName;
  }

}

*IgniteAlphaCachemanager

public interface AlphaCacheManager {
AlphaCache<?, ?> getCache(Class<?> cacheClass);
}

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.springframework.stereotype.Repository;

@Repository
public class IgniteAlphaCacheManager implements AlphaCacheManager {

private final Ignite ignite;
private final Map<Class<?>, AlphaCache<?, ?>> caches;

public IgniteAlphaCacheManager() {
  System.out.println("Init cache...");
    ignite = Ignition.start("classpath:/spring/ignite-configuration.xml");
    //ignite = Ignition.start();
    caches = new ConcurrentHashMap<>();
    initCaches();
}

private void initCaches() {
  IgniteCache<Integer, BaseIdea> igniteCache = ignite.getOrCreateCache(BaseIdea.class.getName());
  AlphaCache<Integer, BaseIdea> ideaCache = new IgniteAlphaCache<>(igniteCache);
  caches.put(BaseIdea.class, ideaCache);
}

@Override
public AlphaCache<?, ?> getCache(Class<?> cacheClass) {
  return caches.get(cacheClass);
}

}

}

The exception that i get it below on tomcat startup:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryHibernate' defined in class path resource [spring/databaseContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ignite/internal/processors/cache/CacheProjection
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:187)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1048)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1018)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:570)
    ... 24 more
Caused by: java.lang.NoClassDefFoundError: org/apache/ignite/internal/processors/cache/CacheProjection
    at org.apache.ignite.cache.hibernate.HibernateRegionFactory.buildTimestampsRegion(HibernateRegionFactory.java:189)
    at org.hibernate.cache.spi.UpdateTimestampsCache.<init>(UpdateTimestampsCache.java:73)
    at org.hibernate.internal.CacheImpl.<init>(CacheImpl.java:72)
    at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:40)
    at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:35)
    at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:91)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:273)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)
    at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372)
    at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454)
    at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    ... 35 more
Caused by: java.lang.ClassNotFoundException: org.apache.ignite.internal.processors.cache.CacheProjection
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
    ... 52 more

A: The version for ignite-hibernate has to be the same as for other artifacts (1.6.0 in you case).
Note that ignite-hibernate is not deployed in Apache Central due to licensing restrictions (Hibernate is licensed under LGPL). You can use the repository provided by GridGain instead:
<repositories>
    <repository>
        <id>GridGain External Repository</id>
        <url>http://www.gridgainsystems.com/nexus/content/repositories/external</url>
    </repository>
</repositories>


text:
Q: Python AttributeError: 'module' object has no attribute 'atoi' I tried to run following program of using python 3.2 , there is error:
 'module' object has no attribute 'atoi'
 Can anybody tell me what should I do to fix this?
i really appreciate it !
import string
def converttoint(str):
    try:
        value = string.atoi(str)
        return value
    except ValueError:
        return None

A: string.atoi has been deprecated for a very long time.  Since Python 2.0, in fact, and it doesn't exist in Python 3.
Simply use
value = int(s)

instead, and don't call your variable str.  That's a bad habit, as it shadows the builtin string type str.


text:
Q: getting the right colIdx in ExtJs ExtJs is a new world for me. I hope I can get the problem explained very well.
I have a grid with different editor columns. If I change one and save it, I have to change the output.
I do it with
   e.row.cells[e.colIdx].childNodes[0].innerText = '{s name=column/express/yes}JA{/s}';
    e.row.cells[e.colIdx].classList.add("warning");

If I change 2 different fields at the same time, e.colIdx does not fit anymore to the right column.
Is there a getter or anything else to get the column of a special grid column ?
Here is the complete code
   onSavePosition: function(editor, e, store, options) {
    var me = this,positionStore;
    if (((e.newValues.md_express != e.originalValues.md_express) && e.record.internalId > 0)
        || e.newValues.md_supplier != e.originalValues.md_supplier) {
            var customCallback = function (position, success) {
                Ext.Ajax.request({
                    method: 'POST',
                    url: '{url controller=AttributeData action=saveData}',
                    params: {
                        _foreignKey: e.record.internalId,
                        _table: 's_order_details_attributes',
                        __attribute_md_express: Number(e.newValues.md_express),
                        __attribute_md_supplier: e.newValues.md_supplier
                    },
                    success:function(response){
                        var t=this;
                        me.getOrderList().store.load();
                        var selectedRowIndex=e.grid.getSelectionModel().getCurrentPosition().row;
                        var selectedRowRecord=e.grid.getStore().getAt(selectedRowIndex);
                        selectedRowRecord.set('md_express',e.newValues.md_express);
                        selectedRowRecord.set('md_supplier',e.newValues.md_supplier);
                        selectedRowRecord.commit();

                        debugger;
                        if((e.newValues.md_express != e.originalValues.md_express)) {
                            if (e.newValues.md_express == true) {
                                e.row.cells[e.colIdx].childNodes[0].innerText = '{s name=column/express/yes}JA{/s}';
                                e.row.cells[e.colIdx].classList.add("warning");
                            } else {
                                e.row.cells[e.colIdx].childNodes[0].innerText = '{s name=column/express/no}NEIN{/s}';
                                e.row.cells[e.colIdx].classList.remove("warning");
                            }
                        }

                    }
                });
            };

            options.callback = customCallback;
    }

    me.callParent([editor, e, store, options]);
}

A: my solution is
var colIdx = me.getColumnIndex(editor.grid,'md_express');

    getColumnIndex: function(grid, dataIndex) {
    gridDataIndices = Ext.Array.pluck(grid.columns, 'dataIndex');
    return Ext.Array.indexOf(gridDataIndices, dataIndex);
}

this sends back the column index of the given column in my grid.
Found here
how to find column index using dataIndex Extjs 4


text:
Q: Xen vs dual-boot for games friends!
I'm using Ubuntu for making games, browsing net and anything I could ever do and I really like it. However, there is a little problem. My favourite game series Resident Evil doesn't run well via Wine. They have several major issues(mostly shader bugs) that can make the game unplayable. The biggest issue is one of the ambient shaders/post-process filters being completely black(leaving only overlay post-process effects like flares on).
In this video you can see the issue. In this specific case the broken shader is just covering the unlit parts (and is supposed to produce ambient effects and global illumination). However, in some other parts it makes the game unplayable because I only see flares. The same bug is in Resident Evil 6 and Resident Evil 4 and any else Resident Evil game that is even possible to run on Linux Wine.
So I thought - I need Windows. But I don't want to say goodbye to Linux Ubuntu. I know 2 methods - dual boot and virtual machines. I've heard that virtual machines are slow and inefficient. However, I don't know how to set up dual-boot, how safe is it and how much will it affect the overall computer performance.
Question 1: Is it possible to run games smoothly via Xen or any other virtual machine? How? How safe is it?
If question 1 answer is - no or very difficult than:
Question 2: How do I install Windows in dual boot as my second OS with those specific rules - Windows can use only certain space of disk(e.g. 128 GB out of the 1 TB disk I've got), Windows can never-ever access files which belongs to Linux. On boot it offers me to choose OS but if I don't choose which one to boot for several seconds(which I can define myself) than Linux boots automatically.
System Specs:

*

*Laptop: Lenovo IdeaPad Y700

*CPU: Intel i5-6300HQ

*GPU: NVIDIA GeForce GTX 960M

*RAM: 4 GB DDR4

*HDD: 1 TB

I hope that this isn't too broad question. Hopefully the great Ubuntu community will be able to help me.

A: Well, This is a very Interesting question, and the answer is yes. You can run a Windows Machine under Linux/KVM and use IOMMU GPU Pass-through to do a PCI Passthrough on your Graphics Card. This will however require an IOMMU compatible motherboard. This process also requires you to make some changes to your bios. You must use Virtio Drivers for your Windows Virtual Machine and then you need to do a GPU passthrough. Technically you are running your game under Windows, However the KVM GPU passthrough will help you to directly pass through the Graphics Card Calls into the Operating System. You would be able to see your graphics card inside the virtual Machine.
Here is a few uselful links which give you more information on this
https://www.pugetsystems.com/labs/articles/Multiheaded-NVIDIA-Gaming-using-Ubuntu-14-04-KVM-585/
Some performance comparisons here..
http://grids.ucs.indiana.edu/ptliupages/publications/Cloud_2014.pdf
This blog post has some more useful information Just search through the archives on this.
http://vfio.blogspot.in/
All these links are reference materials, I am not trying to promote any blog here, However the scope of the question is so wide that it really does need reference material to understand the answer.
Please go through this and let  us know if you need any more information.
Answer to second question if you find this intimidating or difficult.
Yes you can do a dual boot configuration. However you would need to first install Windows and then shrink the windows partition. Give it whatever disk space you want to give it.
Once done reboot into the Ubuntu Live environment. Fire up Ubiquity installer and while partitioning select custom partitioning and select the un-partitioned space and install Ubuntu there.
Always Backup your data before you do anything to the operating system. If you still have confusions there is a lot of questions around Dual Booting on Ask Ubuntu which you can refer to.
Let me know if you need any more information.


text:
Q: How can I repeat the same node in javascript to edit html? I have a html/javascript based program which I am using in python flask. The real problem is with my javascript code.
@app.route('/')
def server():
    def server_generator():
        yield(render_template("layout.html"))
        text = request.args.get('text')
        if text != None:
            yield("""
            <script>
                var maindiv = document.createElement('div');
                maindiv.setAttribute('class', 'container');
                var mainp = document.createElement('p');
                mainp.setAttribute('class', 'user');
                var mainspan = document.createElement('span');
                mainspan.setAttribute('class', 'time-right');
                var text = document.createTextNode("{0}");
                var time = document.createTextNode("{1}");
                mainp.appendChild(text);
                mainspan.appendChild(time);
                maindiv.appendChild(mainp);
                maindiv.appendChild(mainspan);
                bossdiv = document.getElementById('serverid');
                bossdiv.appendChild(maindiv);
            </script>
            """.format(data, server_info))
    return Response(stream_with_context(server_generator()))

The code above works once, but after the second time, it just writes over the first appended node. I tried using .cloneNode(true), but it didn't work (or I didn't use it properly). I'm not sure how to resolve this type of issue and what I need to add to append the same node multiple times.


text:
Q: Implement Parcelable for a List> I want to pass a List<Map<String, String>> to another Activity. How to implement Parcelable for it?

A: When possible, try to use Bundle instead Map. In your case, List<Map<String, String>> a Bundle can replace very well.
More info: http://developer.android.com/reference/android/os/Bundle.html

A: You could extend Map and implement Parcelable for it. When writing to parcel, you could write elements count as a first int, then iterate over entries and add them one after another like:
destParcelable.writeInt(size());
for (final Entry<String, String> entry : getEntries()) {
  destParcelable.writeString(entry.getKey());
  destParcelable.writeString(entry.getValue());
}

When reading from parcel just read the first int (that will be your entries count) and start a loop reading key and values one by one:
final int size = srcParcelable.readInt();
for (int i=0; i<size; i++) {
  put(srcParcelable.readString(), srcParcelable.readString());
}

And I believe there is a method to add list of parcelables to bundle, and since your map is a parcelable now it won't be any problems.

A: You can do it like this:
1. Make a constructor of activity where you want to pass this list.
public Class CalledActivity extends Activity{

List<Map<String, String>> list;
public calledActivity(List<Map<String, String>> list){
this.list=list;
}
}

2. Call this constructor from the activity, you want to pass the list from.
See this question for reference. android activity class constructor working


text:
Q: Reading CSV file And Show Data I'm bit puzzle with some basic and now I decided that I should take help. I have simple .csv file with following data:

And I need following output:

I have already done it but in my coding, I'm reading column name with hardcoding. This will cause issue if column will change their position like below:

I think this can be done easily using for loop but I'm struggling at this stage. So please be kind and guide me.
my hardcoded code is as follows:
public override System.Collections.ObjectModel.ObservableCollection ExtractSamples()
{
ObservableCollection samples = new ObservableCollection();
            List<string> lines = this.GetTextLines();

            foreach (string line in lines)
            {
                string[] parts = line.Replace("\"", "").Split(new string[] { "," }, StringSplitOptions.None);
                for (int i = 0; i < parts.Length; i++)
                {
                    parts[i] = parts[i].Trim();
                }

                Sample sample = new Sample(parts[1].Trim()); //for reading sample name Test1, Test2
                samples.Add(sample);

                sample.AddResult(DateTime.Now, "C1", parts[2]); //for adding Sample headers and it's Value like C1, 0.001692
                sample.AddResult(DateTime.Now, "C2", parts[3]);
                sample.AddResult(DateTime.Now, "C3", parts[4]);

        }

        return samples;
    }

A: Here is how you do it by using a library called CsvHelper:
https://joshclose.github.io/CsvHelper/
The example is taken(modified a little) from the CsvHelper site and demonstrates a while loop:
void Main()
{
    using (var reader = new StreamReader("path\\to\\file.csv"))
    using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
    {
        var records = new List<CsvData>();
        csv.Read();
        csv.ReadHeader();

        while (csv.Read())
        {
            var record = new CsvData
            {
                C1 = csv.GetField("C1"),
                C2 = csv.GetField("C2"),
                C3 = csv.GetField("C3")
            };
            records.Add(record);
        }
    }
}

public class CsvData
{
    public string C1 { get; set; }
    public string C2 { get; set; }
    public string C3 { get; set; }
}

Let me know if there is anything unclear. Also it would be good if you posted what you have coded so far.
Update related to comments
List<string> lines = this.GetTextLines();

var c1HeaderIndex = lines[0].FindIndex(x => x == "C1");
var c2HeaderIndex = lines[0].FindIndex(x => x == "C2");
var c3HeaderIndex = lines[0].FindIndex(x => x == "C3");

sample.AddResult(DateTime.Now, "C1", parts[c1HeaderIndex]);
sample.AddResult(DateTime.Now, "C2", parts[c2HeaderIndex]);
sample.AddResult(DateTime.Now, "C3", parts[c3HeaderIndex]);


text:
Q: Decomposition of ball in Banach Tarski paradox and covering a soccer ball
*

*Banach Tarski paradox says that it's possible to decompose a ball in $R^3$ into a finite number of disjoint subsets, which can be then reassembled into 2 identical copies of the original ball. Furthermore, 5 subsets is enough. My questions are:

*

*How to do this with 5 subsets?

*Is 5 the smallest number?

*As I observe, a soccer ball is covered by regular pentagons and regular hexagons (but they are not flat). My questions are:

*

*How to calculate the number of each type?

*Do these pentagons have the same side? If yes, how long is it? Same questions for hexagons.

*Why are regular pentagon and hexagon but not other regular polygons?, not other combinations?, not other types of polygons?

In both parts, let's use the unit ball (radius = 1) for simplification.


text:
Q: How do I create page transitions? I want to create a circular page transition as shown in the navigation of this site I know I need to use barba.js however I have no idea where to start I've spent all day looking for a tutorial on how to achieve this but I have found nothing. Can anyone please suggest where to start looking on how to create this I have never used javascript before and am quite new to HTML and css
EDIT: apologies I should've mentioned I already have my site done with separate pages now I would like to sort out the transitions between them.

A: to use a javascript library is a difficult thing if you have never seen javascript, but if you are familiar with coding in other languages you could start by scripting simple tests and see how it works, watch some short tutorial or see examples, and then look to specific documentation on how to use barba.js
Instead if you haven't programmed anything yet start from the basis, learn about the logic of programming (using tutorials for beginners and trying small projects yourself), at some point you'll be ready to create using a library :)

A: I would recommend getting a solid fundamental understanding of HTML, CSS, and JavaScript before implementing a JavaScript library like barba.js. barbra.js is implemented in JavaScript so it will be confusing to try to understand where the library ends and pure Javascript starts. https://www.w3schools.com/js/default.asp is a great resource to get a solid fundemental in js. Here is the link to a barba.js tutorial if you still want to go ahead with it https://barba.js.org/docs/getstarted/basic-transition/

A: Perhaps make a new page, then transition from there. I haven't been doing HTML for a bit, so I've lost the code. Perhaps, use  from transfering one page to another.


text:
Q: New-LocalUser returns null but user account is created I am creating a local user by running below command.
$LocalAccount = New-LocalUser "myaccount" -Password "*****" -FullName "My Account" -Description "My Account" -AccountNeverExpires -PasswordNeverExpires

According to Microsoft documentation, New-LocalUser command is supposed to return a LocalUser object.
Right after that, I am adding that account to Administrators group but it fails as $LocalAccount is null even though I can see that the account is created.
if ((Get-LocalGroupMember -Group "Administrators" -Member $LocalAccount).Count -eq 0)
{
    Add-LocalGroupMember -Group "Administrators" -Member $LocalAccount
}

This happens only when I run this as part of a script. If I just run     $LocalAccount = New-LocalUser "myaccount" -Password "*****" -FullName "My Account" -Description "My Account" -AccountNeverExpires -PasswordNeverExpires, it works fine and I can see $LocalAccount has new user info.
What am I missing here?

A: I think the problem is Get-LocalGroupMember which doesn't give you any output when run within the script. This means your If statement will always return false and the Add-LocalGroupMember is not getting executed.
Alternatively, you can add the user to the group at the time of account creation:
$LocalAccount = New-LocalUser "myaccount" -Password $Secure_String_Pwd -FullName "My Account" -Description "My Account" -AccountNeverExpires -PasswordNeverExpires -Verbose  | Add-LocalGroupMember -Group "Administrators" -Verbose

if you want to keep your original script they try using write-output:

$LocalAccount = New-LocalUser "myaccount" -Password $Secure_String_Pwd -FullName "My Account" -Description "My Account" -AccountNeverExpires -PasswordNeverExpires -Verbose

if ((Get-LocalGroupMember -Group "Administrators" -Member $LocalAccount  -Verbose -ErrorAction SilentlyContinue| Write-Output).Count -eq 0)
{
    Add-LocalGroupMember -Group "Administrators" -Member $LocalAccount -Verbose
}

Your if statement is not helping because the account is freshly created using New-LocalUser so no need to check if it is part of the Administrators group.

A: Firstly, you must pass an encrypted password to New-LocalUser, so that is probably why you are not getting a return object. Also you need to use the .Name portion of the object when you perform the Add-LocalGroupMember or Get-LocalGroupMember. Also instead of '-eq 0' (which works), it's always better to use '-lt 1'.  Lastly consider using 'measure' if you are trying to get a count.
Rough working example:
$passwd = ("thepassword" | ConvertTo-SecureString -AsPlainText -Force)
$AddObj = (New-LocalUser "myaccount" -Password $passwd -FullName "My Account" -Description "My Account" -AccountNeverExpires -PasswordNeverExpires)
if ((Get-LocalGroupMember -Group "Administrators" | where-object Name -match "\\${AddObj.Name}$" | measure).Count -lt 1)
{
    Add-LocalGroupMember -Group "Administrators" -Member $AddObj.Name
}

*

*Note this is just a rough example, you need to check for the user first and also it's better to use a variable for the account id and not the object IMO.


text:
Q: Why does Safari/WebKit appends .html to downloaded files? I'm having lot of issues with Safari. When I provide a download from a PHP script the downloaded file has ".html" extension appended. Despite the HTTP headers I send to the client, I found them changed in inspector; in particular the mime-type is always set to text/html.
Here what I'm sending to the browser:
<?php

....

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: public, must-revalidate, post-check=0, pre-check=0");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=\"{$file['name']}\"");
header("Content-Type: ".$file['type']?$file['type']:'application/octet-stream');
header("Content-Transfer-Encoding: binary");
header('Content-Length: ' . filesize($file['file']));

ob_end_flush();
@readfile($file['file']);

Where $file contains:
$file = array(
  'name'=>'myfile.zip',
  'file'=>'/tmp/myfile.zip',
  'type'=>'application/zip'
);

What can I do?


text:
Q: Acer laptop Win 10 Won't Turn On Wifi (used to work) I'm working on a laptop for a client. It's an old Acer 5253-bz692. WiFi was working until the client came to pick it up (of course). I updated to WIn 10 1703 and WiFi continued to work. The only thing I did that could be related is I upgraded the RAM, which is nearby the WiFi card.
Here's what I've done so far:

*

*Settings > WiFi Settings > Turn On WiFi (it shows as off). That
switches the toggle, but never turns on. If I reload the WiFi
settings, it shows as off again.

*It does have a keyboard shortcut to enable/disable WiFi (Fn + F3), but that does nothing at all. (the other F-key hotkeys work).
This machine does not have a hardware switch for WiFi.

*Reinstalled WiFi driver.

*Replaced WiFi card, installed drivers.

*Disabled power management (don't allow Windows to turn off wireless)

*Found a couple posts that said with Intel cards to disable 40hz. Now explicit setting for that here, but found one similar and changing it did nothing.

*I don't see anything in the BIOS for enabling/disabling it.

*Restarted machine multiple times. Also pulled battery and cord and held power for 30 seconds.

Any suggestions?

A: It's now working after multiple restarts and continues to work after more. The WiFi hotkey (Fn+F3) does work, but only if held about 5 seconds. Doh.

A: I installed RF Button driver for Win 8.1 from another model and FN+F3 is working again. The name of the ZIP archive is Others_Dritek_2.02.2001.0803_W81x64_A.zip


text:
Q: what are pervasive applications I know this isnt a question with code in it. But ive been searching the internet for the answer and cant find it anywhere.
What is a pervasive app?
And why are native apps essential in their development?
Thanks in advance for any help given.

A: A pervasive in an app (usually mobile app) that adapts at runtime to its external environment. For example, it uses geolocalization, phone sensors, externals sensors (ex. surrounding air quality sensors), surrounding data (ex. yp places database) and so on to provide a highly personalized user experience. Pervasive apps are also called context-aware apps.


text:
Q: How to write BigQuery/SQL query to divide average of a column in one table from column in second/another table I am looking for SQL query to SELECT ratio of Value1/Value2 from two tables as below..
Table_1:
-------
 id  Type  Count

1.   A.      2
2.   B.      3
3.   A.      1
4.   A.      4
5.   B.      2

Table_2:
id  Type   Max
1.   A.     10
2.   B.     10

where Value1 = SELECT  AVG(Count) FROM Table_1 GROUP BY Type

and   Value2 = SELECT Max FROM Table_2.

I tried below query
WITH table1 (SELECT AVG(Count) as avg_cnt...),
     table2 (SELECT Max as max_val....)
     SELECT table1.avg_cnt/table2.max_val
     FROM ..

But it did not work.

A: You can try using join
Select cnt/maxval
from
(
select type,avg(count) cnt
from table1
group by type
)A join table2 on table1.type=table2.type

A: You can just aggregate and calculate:
select t2.type, avg(t1.count) / t2.max
from table1 t1 join
     table2 t2
     on t1.type = t2.type
group by t2.type, t2.max;

No subqueries or CTEs are needed.


text:
Q: Django {% url %} tag for the currently rendering view I'm developing a website that lets the user read books, displayed in different ways. For example, I have the following URLs:

*

*/read_in_white/book_name/chapter_number - Shows white pages

*/read_in_pink/book_name/chapter_number - Shows pink pages
My view functions are read_in_white(request, book_name, chapter_number) and read_in_pink(request, book_name, chapter_number)
At first I only had read_in_white, which showed white pages. It also had some paging controls in a Bootstrap navbar. These were all located in the read_in_white.html template, which included controls for navigating for a different book or chapter. For example, I had the following in the template:

Now I want to add the read_in_pink view and template. The navigation part of read_in_pink will be almost identical to the one in read_in_white, with one difference:

I want to move all the navigation to a base template, but I can't figure out what to put in the (% url %} tag. How do I find the current view's name? I know I can add it to the context, or I can change book and chapter to be query parameters so the URL is /read_in_pink?book=...&chapter=..., but I was hoping there was something as simple as {% url this_view ... %}.
Is there?

A: No, there is not, since that would introduce a very stronger coupling between view and template and that's usually a bad idea.
But this sounds like you want to parameterize the color, doesn't it?
Then you can pass the color to the navigation or wherever you want to.
def read_in_color(request, color, book, chapter):
    if color == "white":
        return render_to_response("whitetemplate")
    if color == "pink":
        return render_to_response("pinktemplate")

Then in your templates
{% url "app.views.read_in_color" color="pink" book="Good Book" chapter=1 %}


text:
Q: Calling LoadLibraryEx on ISAPI filter failed (v4.0.30319) I installed .Net 1.1 on a Windows Server 2008 (which already had .NET 4 installed). Afterwards, I started getting the following error:
HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed

I have tried running aspnet_regiis without success. I have also tried the suggestions by Rick Strahl  but to no avail.
I have also removed .NET 4.0.30319 using the cleanup tool. When I reinstalled it, The error was still there. I have already removed 1.1 but still i get that error. Please help.

A: Resolved by adding a new asp.net site and assigning a new application pool.

A: This fixed the issue for me as re-creating the website didn't work:
http://www.west-wind.com/weblog/posts/2011/Apr/04/Error-on-64-Bit-Install-of-IIS-LoadLibraryEx-failed-on-aspnetfilterdll
This is worth reading, as long as the link lives, but in summary, there are 2 fixes

*

*(quick fix) Set the app pool's Enable 32-Bit Applications to true

*(ideal fix) Adjust the system.webServer/isapiFilters configuration setting so that IIS will use the correct dll when operating in 64-bit mode

A: From error one can observe that path mentioned was incorrect(Extra slash before .dll file).
Edit ISAPI filter and edit the path to remove extra slash.

A: The problem is the double backslash.
Go to your server and select "ASAPI Filter" and remove the second backslash from path ;)
Then from blog.clicdata.com:
Get a command prompt in administrator mode and go to C:\Windows\Microsoft .NET\FrameWork64\v4.xxx
and run aspnet_regiis -r.  This will re-register the right libraries

A: I got this error, too. Before you do any above stuff, just try below

*

*Click on your computer icon in IIS.

*On right side, click ISAPI filters

*Pick up the Filter name ASP.Net_4.0_64bit.

*Check if filter path have an extra \ preventing to load this dll, e.g.: %windir%\Microsoft.NET\Framework64\\v4.0.30319\aspnet_filter.dll
->
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll

*Restart IIS – should resolve the error.

A:
I got same error in my 2008 server 64bit  VM environment
I did following and IIS works fine

*

*Go to IIS  Manager

*Open Application pool

*Write click on DefaultAppPool go to advance settings and enable 32 bit application to true

*apply the same to settings to
ASP.NET v4.0
ASP.NET v4.0 Classic
Classic .NET AppPool


text:
Q: Node: Move the current directory of the interactive shell I'm writing a little CLI tool for Node.js. There are some situations where I'd like to run modify the current directory of the shell that runs my program:
some/location$ myProg moveToSomewhere
some/other/location$

child_process can't help here, since its commands run in a different shell.
Is there a way to do this?


text:
Q: need a bittorrent daemon I'm building a Ubuntu server for the house.  I want to centralize torrents.  what I'm looking for is something that runs as a service (daemon) that has 3 folders to configure.

*

*Actively downloading torrents - this will be a folder where I can just drop a torrent file and the service picks it up and starts downloading

*Seeding torrents - when a torrent is finished downloading, the actual torrent file is moved to this folder.  when the torrent file is deleted from this folder, the daemon stops seeding

*download folder - the folder where it drops files as they are downloading.

Additional features would be nice, like a web or console based screen where I can see the status of the downloads and such, but the fact that it can run as a deamon without someone logged in is a deal breaker.
Let me know if you know of anything.

A: For pure daemon usage on a headless server, rtorrent would be the client I would go to.  It's command-line and very feature complete, although it's not the easiest thing to set up being purely command line.  There are numerous web interfaces to rtorrent as well, although, again, they don't seem to be very easy to set up.
For GUI clients, I prefer qBittorrent because it works very well and has a good interface.  It has a web interface, too, although I currently do not use it.
Deluge is alright, but when I was using it 2-3 years ago I found it would stall constantly and the performance was significantly less than other clients.  I cannot say if this is true today, however.
Transmission works pretty well, but always seemed very bare-bones to me.
My personal experiences with the devs and admins on the uTorrent forums (I found them insulting, foul-mouthed, condescending, arrogant, and self-entitled) have led me to wholly shun the program.  I no longer recommend it on any platform regardless of how mature uTorrent is.  Indeed, I tend to recommend anything else.

A: You wanna use Deluge. It's awesome.
From the About Deluge page:

*

*Core/UI split allowing Deluge to run as a daemon

*Connect remotely to the Deluge daemon

*Web UI

*Console UI

*GTK+ UI

*BitTorrent Protocol Encryption

*Mainline DHT

*Local Peer Discovery (aka LSD)

*FAST protocol extension

*µTorrent Peer Exchange

*UPnP and NAT-PMP

*Proxy support

*Web seed

*Private Torrents

*Global and per-torrent speed limits

*Configurable bandwidth scheduler

*Password protection

*RSS (via Plugin)

*Other  libtorrent features

*And much more!

It also will do all the folder stuff you specified!
Deluge is included in the default apt repos on Ubuntu, so you can just run the following to install it:
 sudo apt-get install deluge deluge-webui deluge-torrent deluge-gtk deluge-console deluge-web

You can configure it via the GTK interface and then run it as a daemon. The Deluge FAQ has a fair bit of useful config documentation you'll likely want to read.
PS - I have nothing to with the Deluge team, I just love great software.

A: Allmost all GNU/Linux torrents have daemons these days. I personally use Transmission, but you can also use Deluge, uTorrent and many others.


text:
Q: CVN input field not accepting input on checkout all of the sudden All of the sudden the CVN input box will not accept input from a user on checkout:
https://www.everydayblade.com/checkout/onepage/
I do not know what changed and do not see a useful error. I've tried several browsers and I simply can not enter data into the field. How can I start to troubleshoot? Thank you as always.
I'm using Stripe payment gateway in test mode.

A: You actually don't have a problem. Your CVN field is fine, and can receive input, but you gave a padding too big with this rule :
#local.css : 678
input.input-text, select, textarea {
    ...
    padding: 9px 20px;
    ...
}

You can check the value of the field by pasting this command in the console of your browser, it will make you see that the value is well here. (Or by removing the rule manually from the browser too)
jQuery("#stripe_cc_cid").val()

To correct this, you can set a new rule only for the element #stripe_cc_cid, and either removing the padding or making the width bigger.


text:
Q: Stuck on a bizarre pathing error I have pathing errors :

Warning: require_once(test/assets/includes/memberfunc.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\assets\includes\logininc.php on line 4
Fatal error: require_once(): Failed opening required 'test/assets/includes/memberfunc.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\test\assets\includes\logininc.php on line 4

Yet my paths are correct. Base directory is test. Test is where all my pages sit. Above it is assets/includes/logininc.php and assets/configs/db_config.php. Everything should be correct. Please advise
This is my very simple form that sits in test called login.php.
<form id="login-form" method="post" action="assets/includes/logininc.php"> <fieldset>
  <legend>Login </legend>

Please enter your username and password to access the administrator's panel

    <input type="text" name="username" id="username" />Username:   <input type="password" name="password" id="password" />Password:   <input type="submit" name="submit" id="submit" value="Login" />  </fieldset> </form>

Which in turn, directs me to the file below. Logininc.php. It is located in assets/includes/logininc.php
<?php

require_once("/test/assets/includes/memberfunc.php");  //LINE 4
require_once("/test/assets/config/db_config.php");

session_start();

if($_SESSION['logged_in'] ==true) {

    redirect('/test/index.php');
        echo "success";
}
else{
    if ( (!isset($_POST['username'])) || (!isset($_POST['password'])) or

    (!ctype_alnum($_POST['username'])))

    redirect("/test/login.php");
}

    $mysqli = @new mysqli(HOST, NAME, PW, DB);

//check connection

if(mysqli_connect_errorno())
{
    printf("Unable to connect to DB! : %s",
           mysqli_connect_error());
    exit();
}

//Escape unsafe chars

$username = $mysqli->real_escape_string($_POST['username']);
$username = $mysqli->real_escape_string($_POST['password']);

//Time to make a SQL Q for execution

$sql = "SELECT * FROM users WHERE username= '".$username . "'AND password = '" . md5($password) . "'";
$result = $mysqli->query($sql);

// If one row is returned, USER AND PW is valid!

if (is_object($result) && $result->num_rows == 1) {

    //set session variable for login true

    $_SESSION['logged_in'] = true;

              redirect('../../index.php');
}
else{ //if number of rows is not one redirect back to login
redirect('../../login.php');
}

    ?>

.
Please advise.

A: 'memberfunc.php' is in the same directory so you don't need the path.  And out of shear laziness, I would put a copy of 'db_config.php' in that directory also so your statements would look like this:
require_once("memberfunc.php");  //LINE 4
require_once("db_config.php");

A: How about using dirname(__FILE__):
require_once(dirname(__FILE__)."/test/assets/includes/memberfunc.php");
require_once(dirname(__FILE__)."/test/assets/config/db_config.php");

A: What you want is the current working directory. This is achieved through 2 different ways:
Relative path:
require_once('./assets/includes/memberfunc.php');

Absolute path:
require_once(getcwd() . '/assets/includes/memberfunc.php');

The major difference here is that the HTML template builds its relative path based on the URL passed to the browser. PHP builds its relative path based on which directory on disk the files are executed from.


text:
Q: Oracle - Query to return first line of a value I am new to Queries.
how I can write a query to pull only the first line from value?
Example -
select address
  from user
 where id =1;

Sample Output (Single row & not 3 rows)
Anthony Benoit
490 E Main Street
Norwich CT 06360

I would like to get only the first line,
which is Anthony Benoit

A: You could use SUBSTR and index on the first new-line character something like this
select substr(lines,0,instr(lines,chr(10))) d
from
(select 'line 1
line2' lines
from dual)

Pay attention to chr(10) you most likely gonna need to improve that part to support different new line chars (e.g. chr(13), chr(13) and chr(10)...etc)

A: Assuming that your example output are three rows.
If you are on 11g and prior, Just add select * from ... where rownum = 1 in the outer query to your posted query, but you also need to have order by column in your inner query.
If you are on 12c, you can simply use ROW LIMIT clause, just add this clause FETCH FIRST 1 ROWS ONLY.


text:
Q: Making heat map with joined layer using QGIS I need to make a heat map with the number of cases by neighborhood.
I have:

*

*a polygon shapefile with the neighborhoods, and

*a CSV file containing the name of the neighborhood and the number of
cases.

Is there a way to do this in QGIS 3.4 LTS?

A: "Heatmap" makes me assume a point density visualisation. What you have is aggregated polygon data it would seem. So you would need to generate the points after first joining the CSV case number column to the polygons via a common ID.
You could then turn that into a heatmap either by using "Generate random points in polygons" in the Processing toolbox based on the case count, and then turning that into a heatmap (just use heatmap as symbology for the points).
Or you could generate centroid points for each neighbourhood and visualise those as a heatmap by weighting each point based on the number of cases (again with point heatmap symbology and use the weighting field).
However, I think this would be methodologically dubious as the heatmap would be influenced by the shape of the areas that the points are generated from. So I would rather recommend visualising this as a choropleth map instead to get a more accurate representation of the data.


text:
Q: Example Usage of the SuiteScript 2 error object In the documentation, I don't see examples of the usage of SS 2 error objects. According to the docs, it looks considerably different. I would be thankful for the example of that usage.
Once again thanks

A: Here's a pretty simple usage example of N/error:
if (!params.searchId) {
    log.error({title: "No Search provided", details: params});
    throw error.create({
        name: "ZC_INV_BREAKOUT_NO_SEARCH",
        message: "You must provide an appropriate Search for the Invoice Carveout script parameter."
    });
}

When a certain input isn't provided to this function, I throw an Error object using N/error.create().
In this example, my module definition looks like:
define(["N/error", "N/log"], function (error, log) {
    ...

HTH


text:
Q: How to compute the log-likelihood of the LDA model in vowpal wabbit I am typical, regular, everyday R user. In R there is very helpful lda.collapsed.gibbs.sampler in lda package tha uses a collapsed Gibbs sampler to fit a latent Dirichlet allocation (LDA) model and returns point estimates of the latent parameters using the state at the last iteration of Gibbs sampling.
This function also has a great parameter compute.log.likelihood which, when set to TRUE, will cause the sampler to compute the log
likelihood of the words (to within a constant factor) after each sweep over the
variables. This is useful for assessing convergence and in comparing different LDA models (computeted for different number of topics).
I am interested if there is such an option in vowpal_wabbit's LDA model?

A: When running vw -h --lda 1 the help offers the following parameters.
The metrics parameter is off by default.
It is used to compute the topic coherence which is implemented here.
Try to enable this functionality by passing --metrics 1
Latent Dirichlet Allocation:
  --lda arg                             Run lda with <int> topics

  --lda_alpha arg (=0.100000001)        Prior on sparsity of per-document topic
                                        weights
  --lda_rho arg (=0.100000001)          Prior on sparsity of topic
                                        distributions
  --lda_D arg (=10000)                  Number of documents
  --lda_epsilon arg (=0.00100000005)    Loop convergence threshold
  --minibatch arg (=1)                  Minibatch size, for LDA
  --math-mode arg (=0)                  Math mode: simd, accuracy, fast-approx
  --metrics arg (=0)                    Compute metrics

Or directly jump into the source code of vw utility.
A helpful presentation showcasing most parameters can be found here.


text:
Q: SSL Connect Error in Curl and Php 5.3.3 My site worked perfectly since 3 years, with below code, now suddenly since 2 days it started giving below error :
SSL Connect error :- in Curl_error
Below is my code :
<?php
$this->ssl_cert = "path_to_my_cert.pem";
$session = curl_init($this->server_url);
curl_setopt($session, CURLOPT_HTTPHEADER, $this->request_header);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
curl_setopt($session, CURLOPT_TIMEOUT, 300);
curl_setopt ($session, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($session, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($session, CURLOPT_SSL_CIPHER_LIST, rsa_rc4_128_sha);
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($session, CURLOPT_CAINFO, $this->ssl_cert);
$response = curl_exec($session);

if (curl_errno($session)) {
    $curl_err = curl_error($session);
    return array("CURL_ERR", $curl_err);
} else {
    curl_close($session);
}
?>

I have 5 different api's working using the above same code and every thing worked perfectly since 3 years. Suddenly one of my api has started giving the error : SSL Connect error.
After few search on net, if found of few of the solutions and tried adding below code to but all in vein :
curl_setopt($session, CURLOPT_SSLVERSION, 3);

My PHP Version : 5.3.3
cURL Information : 7.9.17


text:
Q: center manifold theory I have a general question about local center manifolds at fixed points. In particular trying reduce a dynamical system to its center manifold. I have been reading Perko and wiggins.
Wiggins gives a few examples of planar systems with only complex conjugate eigenvalues, with zero real part. In these cases I have deduced that the center manifold has dimension 2 and is equal to the center subspace of the corresponding linear system, by using the center manifold theorem. In this case how would you write an expression for the center manifold as it is parameterized by points on the center subspace?
Also, in the vicinity of the fixed point, could you ignore the nonlinear terms and just use the linearized system to find the dynamics on the local center manifold?
Finally, You cannot solve the quasi-linear PDE as their are no stable or unstable subspace. Is there another method???


text:
Q: react load svg image from url I am loading an svg image from a url passed in via the src prop.
The trouble I'm having is that I am storing the svg into state but when the url changes the image displayed will be the previous image clicked and not the current image
I can see that the image stored in state is always the last image selected
I believe it is how it is fetching the image from the api and storing it in to state here but I don't quite understand how this works and how it updates the state with the svg
).then(
   svg => this.state.image = svg
);

How can I change this so that state updates with the correct image?
SVG Component
import React from 'react';
import fetch from 'isomorphic-fetch';
import $ from 'jquery';

class InlineSVG extends React.Component {
  state = {
    image: '',
  };

  componentDidUpdate(prevProps) {
    this.loadSVG();
  }

  loadSVG() {
      fetch(this.props.src)
        .then(
          response => {
            if (!response.ok) return Promise.reject(new Error('Server
Error'));
            return response.text();
          }
        ).then(
          svg => this.state.image = svg
        );
  }

  render() {
    return (

    );
  }
};

export default InlineSVG

A: Never mutate state directly. You are mutating state directly and that's why you don't see the Updated image. When you mutate the state directly your component won't re-render and that's why updated image isn't shown
Wrong
).then(
    svg => this.state.image = svg);

Right
 ).then(
    svg => this.setState({ image:  svg});

PS:- to modify React state value you need to use setState so that your component will re render with the updated data


text:
Q: Странные ошибки, которых ранее не возникало Объясните, пожалуйста, как исправить ошибки? Сделал как здесь описано, но при нажатии на кнопку сообщение не выводится https://metanit.com/sharp/windowsforms/1.1.php
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HW_1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Привет");
        }
    }
}

A: Вы должны были кликнут на кнопке
"Наведем указатель мыши на кнопку и щелкнем по ней двойным щелчком."
либо в окне свойства (F4) button1 на событие OnClick установить значание button1_Click


text:
Q: sql server x64 access x86 COM object I want to transfer a database from SQL Server 2000 x86 to SQL Server 2008 R2 x64 but it uses a x86 COM object that I have no inside knowledge of.  I know there are some articles out there about the same topic, but my problem is slightly different.
After registering the DLL Server for Surrogate Activation, I can connect to COM object with sp_OACreate without errors, but sp_OASetProperty returns -2147352565 and sp_OAGetErrorInfo returns error source "ODSOLE Extended Procedure" and error description "Invalid index".


text:
Q: How to search tweets in Twitter API from data endpoint in dev environment using cURL? I want to search some tweets and GET some data from twitter API using dev environment and data endpoint. I produced consumer_key, consumer_secret, access_token, and access_token_secret. Now, I want to know How can I send a request to twitter API using cURL in cmd. When I try the following query, I get an error{bad Authentication}. Please help me if you know how to write correct cURL request for accessing twitter dev and searching tweets in cmd. Thanks for all answers.
here is my cURL request:
curl --trace outputFile.txt "https://api.twitter.com/1.1/tweets/search/30day/my_dev_env_label.json?query=TwitterDev%20%5C%22search%20api%5C%22&maxResults=100" {"Authorization":"OAuth","consumer_key":"XXXXXXXXXXXXXXXXXXXXXXXXX","consumer_secret":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","access_token":"XXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","access_token_secret":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}

I have tried to write it like some existing examples here:
https://developer.twitter.com/en/docs/tweets/search/api-reference/premium-search

A: Finally I found the answer. I decided to publish my answer because I think it might be helpful for some one in the future!
For sending a request to twitter API using cURL, the first step is generating Bearer token by having API(consumer) key and API secret key like the following:
curl -u "REPLACE_YOUR_API_KEY:REPLACE_YOUR_API_SECRET_KEY" --data "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"

Then you'll receive a bearer token. by using this, replace your own parameters with capital words in the following request:
curl "https://api.twitter.com/1.1/tweets/search/PRODUCT/LABEL.json?query=QUERY_URL&maxResults=100&fromDate=YYYYMMDDHHMM&toDate=YYYYMMDDHHMM" -H "Authorization: Bearer YOUR_BEARER_TOKEN"

In the above request, YYYYMMDDHHMM is a date format like: 201907291530
So, It finished successfully!


text:
Q: CORDA Start Flow through HTTP Endpoint I am trying to issue flow through HTTP endpoint. Basically I wan t to create a webserver where I can start a flow by passing some values to the http request. The parameters passed in the http query are the values for the State object along with the name of the owner (otherParty).
@RequestMapping(value = "/issue/{make}/{model}/{year}/{mile}/{vin}/{owner_name}", method = RequestMethod.GET)
    @ResponseBody
    private String issueCar(@PathVariable String make, @PathVariable String model, @PathVariable int year, @PathVariable float mile, @PathVariable String vin, @PathVariable String owner_name){

        CordaX500Name ownerName = new CordaX500Name(owner_name, "New York", "US");
    Party owner = this.proxy.wellKnownPartyFromX500Name(ownerName);
    System.out.println(owner);

    this.proxy.startFlowDynamic(CarRegistrationFlowInitiator.class,make, model,year,mile,vin,owner);
    return "Flow Successful";
    }

I am currently unable to do so. Am I missing anything here?

A: Try to follow the implementation of the controller with this CorDapp: https://github.com/corda/samples-java/blob/master/Accounts/tictacthor/clients/src/main/java/com/tictacthor/webserver/Controller.java
It is doing similar url Post calls as what you are trying to do there. Be sure to check if your server port and rpc port are correctly configured.
    @PostMapping(value = "requestGameWith/{whoAmI}/{team}/{competeWith}")
private ResponseEntity<String> requestGameWith(@PathVariable String whoAmI,@PathVariable String team, @PathVariable String competeWith){
    Set<Party> matchingPasties = proxy.partiesFromName(team,false);
    try{

        Iterator iter = matchingPasties.iterator();
        String result = proxy.startTrackedFlowDynamic(ShareAccountTo.class,whoAmI,iter.next()).getReturnValue().get();
        return ResponseEntity.status(HttpStatus.CREATED).body("Game Request has Sent. When "+competeWith+" accepts your challenge, the game will start!");

    }catch (Exception e) {
        return ResponseEntity
                .status(HttpStatus.BAD_REQUEST)
                .body(e.getMessage());
    }
}


text:
Q: How to start CSS animation ONLY after page has fully loaded? I have a css preloader which runs until the page has fully loaded. Which is then removed with JS.
However, I also have a CSS animation for the home page which is beginning before the page has fully loaded which I want to change to run only once the page has fully loaded and the preloader has been removed of course.
For display purposes, I have added multiple youtube videos (to increase loading time) and I have made the #preloader {opacity: .5}. As you can see the Preloader and it's animation is removed once the page is fully loaded through the use of Javascript.
Unfortunately, however, the rest of the animations can be seen running in the background while the page is still loading and is finished by the time the page has fully loaded. Which defeats the purpose.
Ideally, I would prefer a solution using Javascript as I'm trying to learn the language. Nevertheless, Thanks in advance for your time any help.

var preloader = document.getElementById("preloader");

window.addEventListener('load', function(){
  preloader.style.display = 'none';
});

// var svgContainer = document.getElementById("svg-container");

// window.addEventListener('load', function(){
//  svgContainer.style.display = 'block';
// })

 // $(window).on("load", function() {

$(window).load(function(){
   $('.bullsHead').addClass('bullsHead');
   $('.logoGroup-bounceIn').addClass('logoGroup-bounceIn');
   $('.svg-container').addClass('svg-container');
});

 //  });
body{
    width: 100%;
    height: 100%;
  margin: 0;
  padding: 0;
    overflow-x: hidden;
}

#preloader {
font-family: 'Adam CG', sans-serif;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #333333;
z-index: 99;
opacity: .5;
}

.loading_r {
    color: #fbb03b;
    -webkit-transform: translate(0, -50%);
    -ms-transform: translate(0, -50%);
    transform: translate(0, -50%);
    position: fixed;
    line-height: 0.8em;
    top: 50%;
    left: 0;
    right: 0;
    font-family: ;
    text-align: center;
    pointer-events: none;
    font-size: 4em;
    font-weight: bold;
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    -webkit-animation: loading_r 3s ease-in-out infinite;
    animation: loading_r 3s ease-in-out infinite;
    -webkit-transition: all 0.3s 0.5s ease;
    transition: all 0.3s 0.5s ease
}

.loading_r .period {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
    display: inline-block;
    -webkit-animation: loading_r_period 3s ease-in-out infinite;
    animation: loading_r_period 3s ease-in-out infinite
}

@-webkit-keyframes loading_r {
    0% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    60% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    68% {
        -webkit-transform: scale(1) translate(-0.5em, 0);
        transform: scale(1) translate(-0.5em, 0)
    }
    85% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    100% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
}
@keyframes loading_r {
    0% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    60% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    68% {
        -webkit-transform: scale(1) translate(-0.5em, 0);
        transform: scale(1) translate(-0.5em, 0)
    }
    85% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
    100% {
        -webkit-transform: scale(1) translate(0, 0);
        transform: scale(1) translate(0, 0)
    }
}
@-webkit-keyframes loading_r_period {
    0% {
        -webkit-transform: translate(0, 0) rotate(0deg);
        transform: translate(0, 0) rotate(0deg)
    }
    50% {
        -webkit-transform: translate(0.5em, 0) rotate(-360deg);
        transform: translate(0.5em, 0) rotate(-360deg)
    }
    60% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
    70% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
    80% {
        -webkit-transform: translate(0.2em, 0) rotate(-360deg);
        transform: translate(0.2em, 0) rotate(-360deg)
    }
    100% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
}
@keyframes loading_r_period {
    0% {
        -webkit-transform: translate(0, 0) rotate(0deg);
        transform: translate(0, 0) rotate(0deg)
    }
    50% {
        -webkit-transform: translate(0.5em, 0) rotate(-360deg);
        transform: translate(0.5em, 0) rotate(-360deg)
    }
    60% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
    70% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
    80% {
        -webkit-transform: translate(0.2em, 0) rotate(-360deg);
        transform: translate(0.2em, 0) rotate(-360deg)
    }
    100% {
        -webkit-transform: translate(0, 0) rotate(-360deg);
        transform: translate(0, 0) rotate(-360deg)
    }
}

/*SVG's CSS Manipulation With External CSS;
Link SVG to External CSS using the following:
animation: | name| duration| timing-function|delay| iteration-count| direction
<?xml-stylesheet type="text/css" href="../style.css"?>*/
/* -----------
LOGO
-------------- */

.svg-container {
    background-color: #333;
    animation: svg-container 3s linear 1s;
    transition: all .25s ease-in 2s;
}

.logoGroup-bounceIn {

    animation: logoGroup-bounceIn 3s ease-in 1s;
    transition: all .25s ease-in 2s;
}

.bullsHead {
    animation: bullsHead 3s ease-in 1s;
    transform-origin: 50% 50%;
    transition: all .25s ease-in 2s;
}

@keyframes svg-container {
    0% {background: #4DAF7C}
    50% {background: #F2784B}
    100% {background:#34495E}
}

@keyframes logoGroup-bounceIn {
    0% {transform: translateY(-300px)}
    50% {transform: translateY(150px)}
    100% {transform: translateY(0px)}
}

@keyframes bullsHead {
 0% {transform: rotateY(0deg)}
 100% {transform: rotateY(180deg)}

}

.bullsShadow {
    mix-blend-mode: multiply;
}

.svg {
    width: 100%;
    /*height: auto;*/
}

/* -----------
HOVER BUTTON
-------------- */

.svg-wrapper {
  height: 60px;
  margin: 0 auto;
  position: relative;
  top: 50%;
  transform: translateY(-100%);
  width: 320px;
  cursor: pointer;
}

.shape {
  fill: transparent;
  stroke-dasharray: 170 540;
  stroke-dashoffset: -458;
  stroke-width: 8px;
  stroke: #ECA400;
}

.text {
  color: #fff;
  font-family: 'Roboto Condensed';
  font-size: 22px;
  letter-spacing: 8px;
  line-height: 32px;
  position: relative;
  top: -48px;
  text-align: center;
}

@keyframes draw {
  0% {
    stroke-dasharray: 140 540;
    stroke-dashoffset: -474;
    stroke-width: 8px;
  }
  100% {
    stroke-dasharray: 760;
    stroke-dashoffset: 0;
    stroke-width: 2px;
  }
}

.svg-wrapper:hover .shape {
  -webkit-animation: 0.5s draw linear forwards;
  animation: 0.5s draw linear forwards;

}
<!DOCTYPE html>

 <meta charset="UTF-8">
 <title>Loader Page</title>
  <link rel="stylesheet" href="style.css" type="text/css" media="screen" />

R.

<svg class="svg logo-components" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000" height="600" viewBox="0 100 1000 800"><switch>

<g id="logoGroup-bounceIn" class="logoGroup-bounceIn">
<g id="bullsHead" class="bullsHead">
<path fill="#854B1F" d="M512.6 327.3l75.9-5-29-22.2-25 3.9z"/><path fill="#F2C397" d="M647.6 322.3L587.3 366l-8.7-25.7 9.9-18h59.1"/><path fill="#F3E9E0" d="M739.3 217l-34.8 4.5L716 228l23.3-11"/><path fill="#A17D63" d="M716 228l24-6.5 1.8-3.1-2.5-1.4z"/><path fill="#BE9C80" d="M716 228l-26.2 88.8-25.3-6.7 40-88.6z"/><path fill="none" stroke="#F2F2F2" stroke-width=".25" stroke-miterlimit="10" d="M587.3 366l102.5-49.2"/><path fill="#D49262" d="M597 415.3l47.5-16L656 377l-59 38.3"/><path fill="#140100" d="M525.5 497.8v13l-13.9 5z"/><path fill="#3E292B" d="M587.5 365.9l-49.7 48.2 29.8 2.1z"/><path fill="#723D17" d="M573.3 401.8l29.5-38.8-15.5 3z"/><path fill="#864E26" d="M656.1 377.1l-82.8 24.7 29.5-38.7z"/><path fill="#A96D33" d="M573.3 401.8l23.7 13.5 59-38.3z"/><path fill="none" stroke="#F2F2F2" stroke-width=".25" stroke-miterlimit="10" d="M588.5 322.3l-9.9 18 8.7 25.7"/><path fill="#E18D55" d="M588.5 322.2l-75.9 5 25.2 86.9 50.7-91.9"/><path fill="#D1916D" d="M528 483.3l11 10.5 21.9-50.2-32.9 39.7"/><path fill="#E2B03A" d="M520.7 504.1l29.5 19.7-31.7-13.4z"/><path fill="#F5C34D" d="M550.2 523.8l6.1-4.4M550.2 523.8v16.6-16.6l-29.5-19.7 35.6 15.3v25.3L500 570.2v-7.8l50.2-22"/><path fill="#755848" d="M533.5 509.2l5.5-15.4 6 20.1zM546.9 522.6l-1.9 16.5-20.1-5.6 6.1-17.2z"/><path fill="#B47030" d="M560.9 443.6l-1.4 47.2-10.4 24.8-4.1-1.7-6-20.1z"/><path fill="#603813" d="M534.5 304l-13-4.1-8.9 27.4z"/><path fill="#AB6726" d="M512.6 327.3l25.2 86.9-37.8-48.3z"/><path fill="#D0985E" d="M560.9 443.7l6.7-27.5-29.8-2.1 23.1 29.6"/><path fill="#BA7E50" d="M578.6 340.4l-40.8 73.7 49.5-48z"/><path fill="#B68857" d="M587.3 366l102.5-49.2-42.1 42.1-28.7-2.2z"/><path fill="#EEDCC5" d="M664.5 310.1l25.3 6.7L587.3 366z"/><path fill="#895136" d="M500 305.5l-21.5-5.6 21.5 66 21.5-66-21.5 5.6"/><path fill="#D88B49" d="M500 365.9l-60.9 77.7L500 412l60.9 31.6-60.9-77.7"/><path fill="#854B1F" d="M487.4 327.3l-75.9-5 29-22.2 25 3.9z"/><path fill="#F2C397" d="M352.4 322.3l60.3 43.7 8.7-25.7-9.9-18h-59.1"/><path fill="#F3E9E0" d="M260.7 217l34.8 4.5L284 228l-23.3-11"/><path fill="#A17D63" d="M284 228l-24-6.5-1.8-3.1 2.5-1.4z"/><path fill="#BE9C80" d="M284 228l26.2 88.8 25.3-6.7-40-88.6z"/><path fill="none" stroke="#F2F2F2" stroke-width=".25" stroke-miterlimit="10" d="M412.7 366l-102.5-49.2"/><path fill="#D49262" d="M403 415.3l-47.5-16L344 377l59 38.3"/><path fill="#5F462A" d="M500 530.6l-24.9 2.9-20.1 5.6 30 13.2 15-2.8 15 2.8 30-13.2-20.1-5.6-24.9-2.9"/><path fill="#140100" d="M474.5 497.8v13l13.9 5z"/><path fill="#3E292B" d="M412.5 365.9l49.7 48.2-29.8 2.1z"/><path fill="#723D17" d="M426.6 401.5L397.2 363l15.5 3z"/><path fill="#864E26" d="M344 377l82.6 24.5-29.4-38.5z"/><path fill="#A96D33" d="M426.6 401.5L403 415.3 344 377z"/><path fill="none" stroke="#F2F2F2" stroke-width=".25" stroke-miterlimit="10" d="M411.5 322.3l9.9 18-8.7 25.7"/><path fill="#E18D55" d="M411.5 322.2l75.9 5-25.2 86.9-50.7-91.9"/><path fill="#D1916D" d="M472 483.3l-11 10.5-21.9-50.2 32.9 39.7"/><path fill="#E2B03A" d="M479.3 504.1l-29.5 19.7 31.7-13.4z"/><path fill="#F5C34D" d="M449.8 523.8l-6.1-4.4M449.8 540.4v-16.6M443.7 519.4l35.6-15.3-29.5 19.7v16.6l50.2 22v7.8l-56.3-25.5v-25.3"/><path fill="#755848" d="M466.5 509.2l-5.5-15.4-6 20.1zM453.1 522.6l1.9 16.5 20.1-5.6-6.1-17.2z"/><path fill="#B47030" d="M439.1 443.6l1.4 47.2 10.4 24.8 4.1-1.7 6-20.1z"/><path fill="#603813" d="M465.5 304l13-4.1 8.9 27.4z"/><path fill="#AB6726" d="M487.4 327.3l-25.2 86.9 37.8-48.3z"/><path fill="#D0985E" d="M439.1 443.7l-6.7-27.5 29.8-2.1-23.1 29.6"/><path fill="#BA7E50" d="M421.4 340.4l40.8 73.7-49.5-48z"/><path fill="#B68857" d="M412.7 366l-102.5-49.2 42.1 42.1 28.7-2.2z"/><path fill="#EEDCC5" d="M335.5 310.1l-25.3 6.7L412.7 366z"/><path fill="#FFE0D1" d="M500 530.6l-24.9 2.9-6.1-17.2 9.5-3.8 9.9 3.3-13.9-18v8.2l-8 3.2-5.5-15.4 11-10.5h56l11 10.5-5.5 15.4-8-3.2v-8.2l-13.9 18 9.9-3.3 9.5 3.8-6.1 17.2-24.9-2.9"/><path fill="#F4C094" d="M472 483.3l-32.9-39.7L500 412l60.9 31.6-32.9 39.7z"/></g>

<g id="bullsShadow" class="bullsShadow" opacity="0.6">
<image overflow="visible" width="576" height="21" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkEAAAAWCAYAAADHEEjLAAAACXBIWXMAAAsSAAALEgHS3X78AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEhxJREFUeNrsnY12m7oWhCUnadKV 9v2ftKdpG1s34mrIaNhbErbb45xKa7EAAQInID5m/yiEWWaZZZZZZplllr+wxFu6mJRSlOuKxnSg +egUjWWrTZ6884fB9dCo0799HJnz3+dtmdeX5VK3TMfjcVk/nU7V9Pr6Gt+2Lct5jvW8v7WOZePY SG1s6rw5prxerrNa57ZQX6Yo9ctvl/NWdXkZ7ePvxuu4dpS8zOvG8Zvy8+fPZdLy8vKyTNcq3759 W6ZZbr88Pz8v0zXK09PTMlnl06dPy2SVu7u7ZdJyf3+/TLyO/eiYxMcfDoe8nHQ5z/N6mXAM6pZ5 jHHZ/vDwsO6b90M9zqN11jy3oXV5evsNXJ8wR7vYjrq8zsfhWG4H14K28jqm/NvWDiXGZVv+m6Er Rj2tV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NMvfVaDWjapBFgipQvT0 9LRMoTgEy32VCjglwFFWgrAt37MPDw+JQCRhKBg2g/GHQp4AKFboPI9fpmORsfka++szzEoOR6Cx qUwVGc4o3VCCvAFgKyDzlCCcG07j8tKuAIkVImt0e0cZGoGhvdsuVYvOjTBLYX8uoakEnakKeeUU tgkLT1eCnr2qzZ65BTuuw7CahCSsfHXk1cFHrcFTacT3TXsagSVfVptQelV1dBBTGQk+0ldYVLs9 m8JwXRwVZmwPGvoOkwG2s1+F+lno9hJJE8mPJ9IXdyzmkkjmElMJUpOK90V/TplA9XGK5/R8bsn3 +T///LMsPz4+LpP2jzkfUL5Hyvbq5cOKUPYtwgueR5jnQsNtrLCE3EAwyzEcqdpCQ89UjtCessQk oaCBfeCbg7QABjitx/GHlKcw67l4XX2FjAFUNwkaGxm5R8xkIYyZ0Hrz36EanTpzL5Ltw5T/CTAA s9RR2YLlBdsAAAAASUVORK5CYII=" transform="translate(212.447 580.952)" opacity=".6"/>
</g>

<g id="logoText" stroke-miterlimit="10"><path fill="#FBB03B" stroke="#ECA400" d="M283.1 693.2h-8.5l-12.2-16.3h-5.5v16.3h-7.5V645h14.3c6.4 0 10.1 2.6 12 4.8 2.5 2.8 3.9 6.7 3.9 11.2 0 4.4-1.4 8.3-3.9 11.1-1.2 1.3-3 2.8-5.6 3.7l13 17.4zm-19.4-23c3.1 0 5.5-.9 7-2.6 1.8-2 2.1-4.7 2.1-6.6 0-2-.3-4.7-2.1-6.6-1.5-1.7-3.8-2.5-7-2.5h-6.8v18.3h6.8zM320.8 682.9h-17.2l-4.1 10.3h-8.3l21-50.4 20.9 50.4h-8.3l-4-10.3zm-2.8-6.7l-5.9-14.7-5.9 14.7H318zM346.8 689.4c-1.9-1.4-3.3-3.2-4.3-5.2-1.1-2.2-1.6-4.7-1.6-7.3V645h7.5v31.9c0 2.9 1 5.1 3 6.6 1.8 1.4 4.5 2.3 7.3 2.3s5.5-.8 7.3-2.3c2-1.5 2.9-3.7 2.9-6.6V645h7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.3-5.4s-.8-4-2.3-5.4c-1.4-1.4-3.4-2.3-5.4-2.3s-4 .9-5.4 2.3zM560.7 707h3.7c2.9 0 4.7 1.2 5.5 2.2 1.2 1.3 1.8 3.1 1.8 5.2s-.6 3.9-1.8 5.2c-.9 1-2.6 2.2-5.5 2.2h-3.1v7.5h-3.5V707h2.9zm7.9 7.3c0-.9-.2-2.1-1-3-.7-.8-1.8-1.2-3.2-1.2h-3.1v8.5h3.1c1.4 0 2.5-.4 3.2-1.2.8-.9 1-2.2 1-3.1zM593.1 729.2v-11.8l-7 10.4-7-10.4v11.8h-3.5V706l10.5 15.6 10.5-15.6v23.3h-3.5zM605.8 716h8.1v3.1h-8.1v6.9h9.9v3.1h-13.4V707h13.4v3.1h-9.9v5.9zM624.3 714.9v14.3h-3.5v-23.3l14 15.3V707h3.5v23.3l-14-15.4zM658.3 710.1h-6.1v19.1h-3.5v-19.1h-6.1V707h15.7v3.1z"/><path fill="#FBB03B" stroke="#ECA400" d="M675.5 734.3h-2.9v-29h2.9v29z"/><path fill="#FFF" stroke="#FFF" d="M709.7 729.2v-11.8l-7 10.4-7-10.4v11.8h-3.5V706l10.5 15.6 10.5-15.6v23.3h-3.5zM730.9 724.5H723l-1.9 4.8h-3.8L727 706l9.7 23.3h-3.8l-2-4.8zm-1.2-3.1l-2.7-6.8-2.7 6.8h5.4zM756 729.2h-3.9l-5.6-7.5H744v7.5h-3.5V707h6.6c2.9 0 4.7 1.2 5.5 2.2 1.2 1.3 1.8 3.1 1.8 5.2 0 2-.6 3.8-1.8 5.1-.5.6-1.4 1.3-2.6 1.7l6 8zm-8.9-10.6c1.4 0 2.5-.4 3.2-1.2.8-.9 1-2.2 1-3 0-.9-.2-2.2-1-3.1-.7-.8-1.8-1.2-3.2-1.2H744v8.5h3.1zM772.1 729.2l-8.8-10.1v10.1h-3.5V707h3.5v9.2l7.1-9.2h4.4l-8.2 10.7 9.8 11.5h-4.3zM784.7 716h8.1v3.1h-8.1v6.9h9.9v3.1h-13.4V707h13.4v3.1h-9.9v5.9zM814.1 710.1H808v19.1h-3.5v-19.1h-6.1V707h15.7v3.1zM818.3 729.2V707h3.5v22.3h-3.5zM831 714.9v14.3h-3.5v-23.3l14 15.3V707h3.5v23.3l-14-15.4zM867.9 720.8v6l-.8.5h-.1c-.1 0-.1.1-.1.1l-.1.1-.1.1-.1.1s-.1 0-.1.1c0 0-.1 0-.1.1-.1 0-.1 0-.2.1 0 0-.1 0-.1.1s-.1.1-.2.1l-.1.1h-.1l-.1.1c-.1 0-.2.1-.2.1-1.3.6-2.6.9-4 1h-.5c-1.2 0-2.4-.2-3.5-.6-.1 0-.2-.1-.3-.1-.1-.1-.3-.1-.5-.2-.4-.1-.8-.3-1.1-.5-.9-.5-1.7-1.1-2.5-1.9-1-1-1.8-2.2-2.4-3.5-.4-1-.7-2.1-.8-3.2 0-.4-.1-.8-.1-1.1v-.6c.1-1.3.4-2.6.9-3.8.6-1.3 1.4-2.5 2.4-3.5s2.2-1.8 3.5-2.4c1.4-.6 2.8-.9 4.3-.9h.8c1.3.1 2.5.4 3.8.9.1 0 .1.1.2.1v4.1c-.5-.4-1-.7-1.5-1-.5-.2-.9-.4-1.4-.5h-.1-.1-.1-.1c-.1 0-.3 0-.4-.1h-.2-.2H861.2h-.1-.1-.1H860.6c-1.4 0-2.8.4-3.9 1.1 0 0-.1.1-.2.1-.5.3-.9.7-1.3 1.1-.1.1-.3.2-.4.4-.1.2-.3.4-.4.5l-.1.1c-.1.1-.1.2-.2.3l-.1.1c-.5.7-.8 1.5-.9 2.3v.1c-.1.3-.1.6-.2.9v1.1c0 .6.1 1.1.3 1.7.4 1.3 1 2.4 2 3.3 1.4 1.4 3.4 2.3 5.4 2.3h1.1c.2 0 .4-.1.7-.1h.6c.4-.1.8-.3 1.2-.5v-4.1H860v-3.2h7.7v2.6z"/></g></g></switch></svg>

   <svg height="60" width="320" xmlns="http://www.w3.org/2000/svg">
     <rect class="shape" height="60" width="320" />
   </svg>

VIEW WORK

A: What about just moving your code in $(window).load(function(){} to window.addEventListener('load', function(){}?
Then it'll add the animation class after the preloader is removed. So then you'll see the animation. Now you're adding the animation before the preloader is removed, and that makes you won't see any animation,


text:
Q: django templates upload file - how to handle a non-existant physical file I am using django to upload an image file to the server.
When the user attempts to view a missing image in the django templates, there is just the broken image displayed, but I want to display a default missing image file.
How do I handle the possibility of the physical file being deleted (or just missing) but the location still stored in the database?

A: Use the exists() method of the file storage. For example if the name of the image field is image the code will look like:
if obj.image.storage.exists(obj.image.name):
    ...

To simplify things you can create a custom template filter:
from django.conf import settings

@register.filter
def default_image(image, default_file):
    if image.storage.exists(image.name):
        return image.url
    return settings.STATIC_URL + default_file

And then use it right in the template:
<img src="{{ obj.image|default_image:'no-image.png' }}" />

A: Check the file object using python
file_obj = Model.objects.get(id=1)

if os.path.exists(file_obj.file):
    file_path = file_obj.file
else:
    file_path = default_path