text:
Q: Dr Java Compiler Issue I think I've been getting this error in a popup. I can compile but when I try to run it gives me "Current document is out of sync with the Interactions Pane and should be recompiled!"
Please tell me how to fix this and how to get my dr.java up and running so that I can compile and test my codes.
Below is a thorough detail of all the errors.

Pop-up error: { 7 errors occured! Please submit a bug report
containing the information below and an account of the actions that
caused the bug (if known) to http://sourceforge.net/projects/drjava.
You may wish to save all your work and restart DrJava.

java.lang.IndexOutOfBoundsException: Invalid index
at javax.swing.DefaultRowSorter.convertRowIndexToModel(Unknown Source)
at sun.swing.FilePane$SortableListModel.getElementAt(Unknown Source)
at javax.swing.JList.getSelectedValue(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI$Handler.valueChanged(Unknown Source)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(Unknown Source)
at javax.swing.JList.setValueIsAdjusting(Unknown Source)
at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at javax.swing.JFileChooser.showDialog(Unknown Source)
at javax.swing.JFileChooser.showSaveDialog(Unknown Source)
at edu.rice.cs.drjava.ui.MainFrame.getSaveFile(MainFrame.java:4662)
at edu.rice.cs.drjava.ui.MainFrame$8.getFile(MainFrame.java:412)
at edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.saveFileAs(AbstractGlobalModel.java:3223)
at edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.saveFile(AbstractGlobalModel.java:3178)
at edu.rice.cs.drjava.model.AbstractGlobalModel.saveAllFilesHelper(AbstractGlobalModel.java:1558)
at edu.rice.cs.drjava.model.AbstractGlobalModel.saveAllFiles(AbstractGlobalModel.java:1535)
at edu.rice.cs.drjava.ui.MainFrame._saveAll(MainFrame.java:5324)
at edu.rice.cs.drjava.ui.MainFrame$ModelListener._saveAllBeforeProceeding(MainFrame.java:9757)
at edu.rice.cs.drjava.ui.MainFrame$ModelListener.saveBeforeCompile(MainFrame.java:9686)
at edu.rice.cs.drjava.model.GlobalEventNotifier.saveBeforeCompile(GlobalEventNotifier.java:428)
at edu.rice.cs.drjava.model.compiler.CompilerEventNotifier.saveBeforeCompile(CompilerEventNotifier.java:98)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._prepareForCompile(DefaultCompilerModel.java:222)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compileAll(DefaultCompilerModel.java:163)
at edu.rice.cs.drjava.ui.MainFrame._compileAll(MainFrame.java:5749)
at edu.rice.cs.drjava.ui.MainFrame.access$5300(MainFrame.java:129)
at edu.rice.cs.drjava.ui.MainFrame$55.actionPerformed(MainFrame.java:970)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

System Properties:
DrJava Version drjava-20190813-220051
DrJava Build Time 20190813-220051

drjava.debug.port = 59754
java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = C:\Program Files\Java\jre1.8.0_144\bin
java.vm.version = 25.144-b01
java.vm.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
path.separator = ;
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg = sun.io
user.country = US
user.script =
sun.java.launcher = SUN_STANDARD
sun.os.patch.level =
java.vm.specification.name = Java Virtual Machine Specification
user.dir = <anonymized user.dir>
java.runtime.version = 1.8.0_144-b01
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs = C:\Program Files\Java\jre1.8.0_144\lib\endorsed
os.arch = amd64
java.io.tmpdir = <anonymized user.home>\AppData\Local\Temp\
line.separator = "\u000d\u000a"
java.vm.specification.vendor = Oracle Corporation
user.variant =
os.name = Windows 10
sun.jnu.encoding = Cp1252
java.library.path = C:\Program Files\Java\jre1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;<anonymized user.home>\AppData\Local\Microsoft\WindowsApps;;.
sun.awt.enableExtraMouseButtons = true
java.specification.name = Java Platform API Specification
java.class.version = 52.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 10.0
user.home = <anonymized user.home>
user.timezone = America/New_York
java.awt.printerjob = sun.awt.windows.WPrinterJob
file.encoding = Cp1252
java.specification.version = 1.8
java.class.path = <anonymized user.dir>\drjava-beta-20190813-220051.jar
user.name = <anonymized user.name>
java.vm.specification.version = 1.8
sun.java.command = <anonymized user.dir>\drjava-beta-20190813-220051.jar
java.home = C:\Program Files\Java\jre1.8.0_144
sun.arch.data.model = 64
user.language = en
java.specification.vendor = Oracle Corporation
awt.toolkit = sun.awt.windows.WToolkit
java.vm.info = mixed mode
java.version = 1.8.0_144
java.ext.dirs = C:\Program Files\Java\jre1.8.0_144\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path = C:\Program Files\Java\jre1.8.0_144\lib\resources.jar;C:\Program Files\Java\jre1.8.0_144\lib\rt.jar;C:\Program Files\Java\jre1.8.0_144\lib\sunrsasign.jar;C:\Program Files\Java\jre1.8.0_144\lib\jsse.jar;C:\Program Files\Java\jre1.8.0_144\lib\jce.jar;C:\Program Files\Java\jre1.8.0_144\lib\charsets.jar;C:\Program Files\Java\jre1.8.0_144\lib\jfr.jar;C:\Program Files\Java\jre1.8.0_144\classes
java.vendor = Oracle Corporation
file.separator = \
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
java.rmi.server.hostname = 127.0.0.1
sun.desktop = windows
sun.cpu.isalist = amd64

DrJava configuration file
In resource bundle edu.rice.cs.drjava.config.options:
nothing
In shadowed configuration:
extra.classpath = G:\\ICS4U0- Computer Science(Mr. Burns)\\becker.jar;G:\\ICS4U0- Computer Science(Mr. Burns)\\becker.jar
key.delete.next = [shift DELETE]
key.delete.previous = [shift BACK_SPACE]
window.height = 744
window.width = 1382
window.x = -8
window.y = -8
window.state = 6
last.dir = G:\\ICS4U0- Computer Science(Mr. Burns)
last.interactions.dir = G:\\ICS4U0- Computer Science(Mr. Burns)
tabbedpanes.state = 683 384 700 400
new.version.notification = all release versions
new.version.notification.last = 1614097735431

Used memory: about 52.96 megabytes
Free memory: about 38.54 megabytes
Total memory: about 91.50 megabytes
Total memory can expand to: about 1.65 gigabytes

Number of processors/cores: 4

Compiler Discovery Log:
}

I can't Uninstall or Update. I borrowed my laptop from the school and I don't have much control over what I uninstall or update. I tried downloading a newer version to overwrite the old version but for some reason that did not work not to talk about the fact that I barely have less than 1 GB of space.
Apart from that, my laptop forced me to restart for some updates or something and now when I open Dr.Java I do not get that error anymore but the compiling and running issue still persists. This is keeping me from running programs and testing them.
More details on the issue, I did some troubleshooting including changing the code so that all it does is create a plain class and the main method, but it still would compile but then ask to be recompiled when I try to run it.
Also, I get this in the console tab at the bottom now:
"Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Compiler is using classPath = '[G:\ICS4U0- Computer Science(Mr. Burns), G:\ICS4U0- Computer Science(Mr. Burns)\becker.jar, G:\Downloads\drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath"


text:
Q: group of functions $\Bbb N \to \Bbb N$ $F$ is the group of all functions fron $\Bbb N$ to $\Bbb N$, $S$ is a relation on $F$:
for $f,g\in F: (f,g)∈K \iff$ for all $n\in\Bbb N, f(n)≤g(n)$.
So what is $g$ or $f$ ? Are they the outputs of $n$ ?
Give me an example of element of $S$
I wrote that $S$ is

*

*partially order

*not a total order (because that $f(n)$ and $f(n+1)$ are not comparable)

*And that order don't have maximal element or greatest element

*And has infinite minimal elements and one least Element
Thanks.
edit
F,g can Be n,n+1

A: I'm assuming these functions from $\Bbb N \to \Bbb N$ are just functions, and not bijections. It's not very clear what this question wants, but looking at what you have:

*

*I agree.

*I disagree that this is sufficient. If $f(n) = n$, then the functions $f(n)$ and $g(n) \overset{\text{def}}{=} f(n + 1)$ are comparable.

*I agree, there are no maximal or greatest elements in $S$. Should you maybe justify this; stating why, given any function $f: \Bbb N \to \Bbb N$, you can always find some $g: \Bbb N \to \Bbb N$ with $(f, g) \in S$?

*I agree there's a least element in $S$, you should probably say what it is. I'm not convinced there are infinitely many minimal elements. Can you justify that, using the definition of minimal elements, and demonstrating what minimal elements of $S$ must look like?

redpajama_set_name: RedPajamaStackExchange


text:
Q: precalculus application: area and cost
A rectangular piece of land to be developed as a memorial park has an area of $48 \;\mathrm{m}^2$. The length of the lot is three times the width of the lot. A rectangular path whose width is $x$ meters is to be constructed along the inner perimeter of the lot. The land contained within the path will be landscaped. The cost to construct the path is \$2 per square meter and the cost to landscape the inner field is \$3 per square meter. Express the total cost to develop this lot as a function of $x$, the width of the path.

I am in doubt of what the problem meant by the rectangular path. This is what I think of the drawing. Please tell me which is right. If they're both wrong, please help me make it right. Thanks!

A: The first drawing is the correct interpretation.


text:
Q: Starting camel route from XML DSL dynamically I am trying to conditionally start the route in XML DSL based on boolean value in property file. But it's kind of not working. I am not sure if it's right way of doing it. Any help is appreciated, Thanks :)
This is my blueprint.xml
<bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
    <property name="location" value="classpath:property.properties"/>
</bean>

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

    <route autoStartup="${isTrue}">
        <from uri="pipe:prs:P" />
        <choice>
            <when>
                <simple>${headers.headerName} == 'DR91'</simple>
                <process ref="reqType"></process>
                <to uri="direct-vm:pipeRequestDR91" />
            </when>
            <when>
                <simple>${headers.headerName} == 'DR93'</simple>
                <process ref="reqType"></process>
                <to uri="direct-vm:pipeRequestDR93" />
            </when>
        </choice>
    </route>

This is my property file - property.properties
isTrue=true

The error I am getting says:
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route(route1)[[From[pipe:prs:P]] -> [Choice[[When[simple{${h...
because of Error parsing [${isTrue}] as a Boolean.

A: You should use Camel's property placeholder syntax which is {{xxx}}, eg do
 <route autoStartup="{{isTrue}}">

A: I don't think this is yet supported.
See here
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html


text:
Q: How does Frobenius method select two independent solutions? Consider the ODE $$y'' - y = 0$$ with solutions $y_{(1)} = c_1 \cosh x + c_2 \sinh x$, or, equivalently, $y_{(2)} = c_1 \exp (+x) + c_2 \exp (-x)$.
If we were to solve the above ODE by Frobenius method, i.e. writing the solution as an ansatz $$y = \sum_{n=0}^\infty c_n x^{n + \lambda},$$ we would obtain the indicial equation $$\lambda (\lambda - 1) = 0$$ with solutions $\lambda = 0,1$ which lead to the solution $y_{(1)}$ above.
I do not understand why is the solution $y_{(1)}$ preferred by the Frobenius method instead of $y_{(2)}$ which would have an indicial equation $\lambda^2 = 0$. At what point does the Frobenius method choose a particular set of linearly independent solutions? I would appreciate any insight on the problem.

A: Frobenius method is for solving equations around a singular-regular point. The equation $y''-y=0$ has no singular points. If you want to solve it using power series, you know that it will be of thew form $y(x)=\sum_{n=0}^\infty c_n\,x^n$. The selection of solutions comes from the choice of initial values. For instance, $e^x$ comes from $y(0)=y'(0)=1$ (that is, $c_0=c_1=1$), while $\cosh x$ from $y(0)=1$, $y'(0)=0$ (that is, $c_0=1$, $c_1=0$).


text:
Q: Jar files in libs folder are not used in Android Gradle build i just started to play with the gradle build system for Android.
However i'm not able build one of my projects. It depends on a jar in the libs/ folder.
Doing gradle build fails in the compileDebug task because all of the classes from the jar file are missing.
It is a library project! Here is my build.gradle file:
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.2'
    }
}

apply plugin: 'android-library'

android {
    target='android-16'
    sourceSets {
        main {
            manifest {
                srcFile 'AndroidManifest.xml'
            }
            java {
                srcDir 'src'
            }
            res {
                srcDir 'res'
            }
            assets {
                srcDir 'assets'
            }
            resources {
                srcDir 'src'
            }
        }
    }
}

Am i missing something obvious?
Goddchen

A: just found the answer myself:
Seems like the current version of the Android Gradle plugin doesn't look for jars in the libs/ folder. So you have to add them yourself:
dependencies {
    compile files('libs/mylib.jar')
}

or
dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}

Place this within the android namespace like this:
android {
    target = "android-15"

    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
    }
 }

A: Just in case none of the solutions worked for you, you may want to try to provide the path to the *.jar manually:
compile files('../<your-library-folder>/<your-library>.jar')

The '../' part means that Gradle will search for the library starting from the root projects folder (not app module).


text:
Q: How to set a Background image in UNO UWP? I am trying to put a background image, so far I have this code:
<Grid.Background>
    <ImageBrush ImageSource="ms-appx:///Assets/Windows-10-Hero-Ninja-Cat-1024x576-03a71eed2a427425.jpg" Stretch="UniformToFill"/>
</Grid.Background>

Which appears this way on UWP on Windows 10:

But when I Build the WASM or Android, the Background image does not appear.

The file property is set Build action: Content, Copy to output directory: Do not copy.

A: Uno's WASM target is still experimental and some features are not available yet. The only yet implemented background brush is SolidColorBrush.
It's implemented for iOS (source code here), but not Android.
Since you're already in a <Grid>, you can simply put your image as first element:
  <Grid>
    <Image Source="ms-appx:///Assets/Windows-10-Hero-Ninja-Cat-1024x576-03a71eed2a427425.jpg" Stretch="UniformToFill" />
    [... put your other controls here]
  </Grid>

A: In case you need to use different background approaches for each platform use xaml conditional prefixes.
https://platform.uno/docs/articles/platform-specific-xaml.html#xaml-conditional-prefixes
You can use  <wasm:Image ... />
At the end of the day you can have the same result with flexible markup.


text:
Q: Cast list from one type to another I am having issues in passing list to a method that accepts parameter of different type.
I have the following method in my namespace: Common.DB2 (One classlibrary)
public List<MyModel> GetDB2Data()
{
 //Get data from db2
}

Where MyModel belongs to Common.Db2 namespace
I have another method in my namespace Common.Sql (Another Classlibrary)
public void PostToSql(List<MyModel> listData)
{
 //Post data to sql
}

Where MyModel belongs to Common.Sql namespace
So basically I get some data from my db2 and post it to sql.
In another class library I get this data and post data as:
//Get Data
var data =  db2Repo.GetDB2Data();

//Post Data
sqlRepo.PostToSql(data);

Here in the above line it fails stating
Argument 1: cannot convert from
  'System.Collections.Generic.List<Common.DB2.MyModel>' to
  'System.Collections.Generic.List<Common.Sql.MyModel>'

I had tried casting like below:
List<Common.Sql.MyModel> sourceList = new List<Common.Sql.MyModel>();
sourceList =  data.Cast<Common.Sql.MyModel>().ToList();

But above again throws exception
Unable to cast object of type 'Common.DB2.MyModel' to type
'Common.Sql.MyModel'.

Any better way to handle/design this.

A: Casting between two models won't work just like that. Your code doesn't know how to map those two models to each other.
You can use some mapping package like AutoMapper for that, or just create a method that converts between the two in some "helper" or whatever.

A: If you want to use the .Cast method, you need to implement the casting operators. You can check how to do it here.
How do I provide custom cast support for my class?
Or you can do this using the .Select method, but you'll need to initialize each object by yourself.
//Get Data
var data =  db2Repo.GetDB2Data();

var sqlData = data.Select(x =>
    new Common.Sql.MyModel(){
    // Do your mapping here
    });

//Post Data
sqlRepo.PostToSql(sqlData );

My suggestion for this scenario: If these models are part of your domain, create the mapping in whenever your architecture tells you to do. Otherwise, just create constructors to do the mapping.
You can learn more about .Select here:
https://msdn.microsoft.com/en-us/library/bb548891(v=vs.110).aspx

A: Well, they're different types, so it's hard to fault the runtime for not doing what you want, since it cannot be done.
If both types are more or less the same, then you could write conversion methods between them and use them to convert the collections:
var sourceList = data.Select(Conversions.Db2ToSqlModel).ToList();

If you can modify the types, you could also provide conversion operators, but the end result is pretty much the same.

A: Is  the same object in both namespaces?  If so, you should delete one copy and simply reference the namespace in your other class.
If they're NOT the same model, you'll need to manually perform some sort of cast - i.e. make a new copy of your destination model and then map it: SQL.MyModel.ID = DB2.MyModel.ID etc


text:
Q: How can i create a pictureBox manually to be exactly between two panels on form1? My form1 size is 800,600
Then i have two panels in the form1 designer:
Panel1 is at location: 0,24 size: 200,437
Panel2 is at location: 584,24 size: 200,437
The result is two panels at each side of the form.
Now i did in my program when you put the mouse somewhere in the form1 area its showing a pictureBox i create in the form1 constructor:
pb = new AnimatedPictureBox.AnimatedPictureBoxs();
pb.Visible = false;
pb.Size = new Size(500, 350);
pb.Location = new Point((ClientSize.Width - pb.Width) / 2,
   (ClientSize.Height - pb.Height) / 2);

The problem is that the new pictureBox variable pb is not in the size that will fill all the area between the two panels.
I want the size of the pictureBox to fill almost all the space between the two panels Width and Height maybe to leave some space like 5 spaces each side so there will be a border.
How can i calculate what the pictureBox size should be ?
EDIT**
This is an image where the program is working regular. On each panel on the left and right i added 4 pictureBoxes.
When i move my mouse cursor inside one of the pictureBoxes area its showing its content in a larger pictureBox in the middle.

And this is how it looks like when i put the mouse cursor in one of the pictureBoxes area the pictureBox in the middle is not big enough its Width and Height dosent make the big pictureBox to be excatly between the two panels. The big pictureBox not high and not wide enough.

A: if you want to make your layout stable even after resizing you should use Dock property for your panels and set Anchor for your picture box. Like that:
panel1.Dock = DockStyle.Left;
panel2.Dock = DockStyle.Right;
pb.Anchor = AnchorStyles.Left | AnchorStyles.Right;

And in general to place it in the center you can use something like that:
var width = this.Width - panel1.Width - panel1.Margin.Horizontal
                - panel2.Width - panel2.Margin.Horizontal;

pb.Size = new Size(width, 300); // put your needed height here

pb.Top = this.Height/2 - pb.Height/ 2;
pb.Left = panel2.Left + panel2.Width + panel2.Margin.Right;


text:
Q: Problem combining hyperref and imakeidx in book parts I have a book with different parts. I number the chapters and pages per part, using the \numberwithin command. I have defined an index per part using {imakeidx} and {hyperref}. The indices list the correct page number in the part, but the hyperlinks always go to the first part.
It appears that I have to redefine the destination page to resolve the page number ambiguity. I couldn't get it working, like getting {hyperref} to use \theHpage.
I enclose a working example which demonstrates this problem below.
\documentclass[12pt]{book}

\usepackage{imakeidx}
\indexsetup{level=\section*,toclevel=section,noclearpage,firstpagestyle=empty}
 \makeindex[name=subjectsI,title=Subject index Part I,intoc,columns=3]
  \makeindex[name=subjectsII,title=Subject index Part II,intoc,columns=3]
%
\DeclareRobustCommand{\idxs}[1]{{#1}\index[subjectsI]{#1}}
\DeclareRobustCommand{\idxsII}[1]{{#1}\index[subjectsII]{#1}}
%
\usepackage{amsmath,amsbsy}
%
\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=black, citecolor=black, urlcolor=black,pageanchor,
hypertexnames]{hyperref}
%
% numbering chapters and pages per part
\numberwithin{chapter}{part}
\numberwithin{page}{part}
\numberwithin{equation}{chapter}
\numberwithin{table}{chapter}
%
% BOOK
%
\begin{document}
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage
%
%PART I
%
\setcounter{page}{1}
\part{This is Part I}
\pagenumbering{arabic}
%
\chapter{ Chapter one-one}
\section{Section one-one-one}
All of us have witnessed how science has profoundly affected  the human condition and transformed society, and how in many instances it managed to transcend man's painful political, ethnic, and \idxs{religious differences}. As such it is a true \idxs{cornerstone} of civilization.
%
\chapter{Chapter one-two}
\section{Section one-two-one}
It expresses the \idxs{collective curiosity} of mankind and has resulted in a double helix of science and technology that  keeps transforming our world over and again.
%
%INDICES PART I
%
\chapter*{Indices}
\addcontentsline{toc}{chapter}{Indices}
\printindex[subjectsI]
\cleardoublepage
%
%PART II
%
\pagenumbering{gobble}
\part{This is Part II}
\pagenumbering{arabic}
%
\chapter{Chapter two-one}
\section{Section two-one-one}
 I go deeper and deeper, as I concentrate on writing, into a kind of \idxsII{underground}. While I'm there, I encounter strange things.
%
\chapter{Chapter two-two}
\section{Section two-two-one}
So I look around that world and I describe what I see, and then I come back. Coming back is important. If you cannot come back, it's scary. But I'm a \idxsII{professional}, so I can come back.
%
%INDICES PART II
%
\chapter*{Indices}
\addcontentsline{toc}{chapter}{Indices}
\printindex[subjectsII]
\clearpage
\end{document}


text:
Q: Why i can not install sharepoint 2013 on a domain controller It is mentioned that it is not recommended to install SharePoint 2013 on a domain controller. But In my current situation I am setting up my development environment for SP2013; where SharePoint and SQL database and visual studio are on a single VM. so I have installed Active Directory on my windows server 2008 R2 , but does this means that my design for installing SP with AD is not recommended??
Best Regards

A: It is not recommended that this be done for production deployments, primarily because of security concerns.  If somebody were to compromise some of the admin accounts for SharePoint they could conceivably also take control of your domain and do a lot of harm.
For non-production environments and domains, this is fine and is frequently done (myself included).

A: It's not recommended, but possible. Check this video, should be useful for you:
http://www.youtube.com/watch?v=n0UVmSSG4dk


text:
Q: Scala Play 2.4 run akka scheduler service on Application start I want to use Akka scheduler to do some cron jobs in my Play application.
Since Play 2.4 GlobalSettings is not recommended. Anyone has some sample code on how to do that?
Even I tried the simple code from Play docs and it still not working.
class CustomApplicationLoader extends GuiceApplicationLoader() {
  val logger: Logger = Logger(this.getClass)

  override def builder(context: ApplicationLoader.Context): GuiceApplicationBuilder = {
    logger.info("start")
    val extra = Configuration("a" -> 1)
    initialBuilder
      .in(context.environment)
      .loadConfig(extra ++ context.initialConfiguration)
      .overrides(overrides(context): _*)
  }
}

play.application.loader = "com.xxx.CustomApplicationLoader"

Why I can't get the logging message to print?
How I can use Akka on Application start?

A: This is how do it in my app:
Start of by defining a trait Scheduled.
package scheduled

import akka.actor.Cancellable

trait Scheduled {

  var cancellable: Option[Cancellable] = None

  val defaultInterval = 60
  val secondsToWait = {
    import scala.concurrent.duration._
    10 seconds
  }

  def start()
  def stop() = {
    cancellable.map(_.cancel())
  }
}

Then implement Scheduled with Akka magic
package scheduled

import akka.actor.ActorSystem
import play.api.{Configuration, Logger}
import com.google.inject.{Singleton, Inject}
import play.api.libs.concurrent.Execution.Implicits._

trait ScheduledWorker extends Scheduled

@Singleton
class ScheduledWorkerImpl @Inject()(
                                                  actorSystem: ActorSystem,
                                                  configuration: Configuration

                                                  ) extends ScheduledWorker {
  start()

  lazy val intervalKey = "worker.interval"
  lazy val jobEnabled = "worker.enabled"

  override def start(): Unit = {
    import scala.concurrent.duration._
    lazy val i = configuration.getInt(intervalKey).getOrElse(defaultInterval)
    lazy val isEnabled = Option(System.getProperty(jobEnabled)).getOrElse(
      configuration.getString(jobEnabled).getOrElse("false")
    ).equals("true")

    cancellable = isEnabled match {
      case true =>
        Some(
          actorSystem.scheduler.schedule(0 seconds, i minutes) {
            .. MAJOR COOL CODE!!! ;))) ...
          }
        )
      case _ => None
    }
  }
}

create a module to eagerly start the scheduled stuff
package modules

import play.api.{Configuration, Environment}
import play.api.inject.Module
import scheduled.{ScheduledWorker}

class ScheduledModule extends Module {

  def bindings(environment: Environment,
               configuration: Configuration) = Seq(
      bind[ScheduledWorker].to[ScheduledWorkerImpl].eagerly()
    )
}

make sure that your config specifies ScheduledModule.
play.modules.enabled += "modules.ScheduledModule"

And voila you have a working scheduled task when your play 2.4 app starts =)


text:
Q: Variable is being used but Golang lint complaining that the variable is not being used Below is the code snippet where i have declared a for loop and getting index and box from the array of boxes. I am using the same index below in the if else block, but the golangci-lint is complaining about the variable index unused
func createMap(action string, boxes []Box, ratesMap FeeMap) []RateRes {

    resp := make([]RateRes, len(boxes))

    overrideKey := fmt.Sprintf("%s-*", action)

    for index, box := range boxes {

        key := fmt.Sprintf("%s-%s", action, boxes.label)
        rate, hasDefault := ratesMap[key]

        if hasDefault {
            resp[index] = RateRes{
                Code:  rate.Code,
                Label: box.label,
            }
        } else {
            resp[index] = RateRes{
                Code:  RatesMap[overrideKey].Code,
                Label: box.label,
            }
        }

    }

    return resp
}

The exact error i am getting is :  Error: index declared but not used (typecheck)
Please suggest how to overcome this issue, which does not seem an issue.

A: In your for loop initialization statement you declare the box variable and it hasn't been used in the codes after that.
for index, box := range boxes {

please remove it if you are not using it change it like this.
for index := range boxes {


text:
Q: CSS - dynamic height I'm trying to build an on-click flip card with dynamic height depending on the elements inside of it.  Right now, I have a height explicitly set to 250px, but ideally I would like the size to be dynamic.  Is this possible?
I've tried setting height to 100%, but that obviously didn't work.  I also tried making  a flexbox, but that doesn't seem to work either. Additionally, I also tried using min-height=250px...not sure why that doesn't work either.  Any lessons on how to correctly determine the CSS is greatly appreciated!
Here's my HTML and CSS:

label {
  -webkit-perspective: 1000px;
  perspective: 1000px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  width: 100%;
 height: 250px;
  cursor: pointer;
}

.card {
  position: relative;
  height: 100%;
  width: 100%;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: all 600ms;
  transition: all 600ms;
  z-index: 20;
}

.card div, .card span {
  display: flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.card div {
  position: absolute;
  height: 100%;
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
}

.card .back {
  background: $color-lightest;
  color: $color-darkest;
  border: 1px solid $color-darkest;
  -webkit-transform: rotateX(180deg);
  transform: rotateX(180deg);
}

input {
  display: none;
}

:checked + .card {
  transform: rotateX(180deg);
  -webkit-transform: rotateX(180deg);
}

.icon-color, .icon-background {
  color: $color-accent-light;
}

.front.icon-color {
  z-index:100;
}

.card .front, .card .back {
  padding:1.5em;
}

.card .front {
  background: $color-darkest;
}

.title{
  text-align:center;
  color: $color-lightest;
}

  <input type="checkbox"/>

My Information

Header

Subheader

Info

Info

Info

Info

Info

Info

Info

Info

Info

Info

A: Yes. It's possible.
height: auto;

https://developer.mozilla.org/en-US/docs/Web/CSS/height
So long as you have a hard-coded value of 250px, it will not be possible.

A: Just letting the browser calculate the height should work. So dont specify a height. But I also had to translate your card to show it where its supposed to be after a 180 rotation. So maybe that's your problem?

label {
  -webkit-perspective: 1000px;
  perspective: 1000px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  display: flex
  flex-direction: column;
  height: 100%;
  width: 100%;
  cursor: pointer;
  background: red;
}

.card {
  position: relative;
  height: 100%;
  width: 100%;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: all 600ms;
  transition: all 600ms;
  z-index: 20;
}

.card div, .card span {
  display: flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.card div {
  position: absolute;
  //height: 100%;
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
}

.card .back {
  background: wheat;
  color: black;
  border: 1px solid grey;
  -webkit-transform: rotateX(180deg) translateY(100%); // translate missing?
  transform: rotateX(180deg) translateY(100%); // translate missing?
}

input {
  display: none;
}

:checked + .card {
  transform: rotateX(180deg);
  -webkit-transform: rotateX(180deg);
}

.icon-color, .icon-background {
  color: $color-accent-light;
}

.front.icon-color {
  z-index:100;
}

.card .front, .card .back {
  padding:1.5em;
}

.card .front {
  background: $color-darkest;
}

.title{
  text-align:center;
  color: $color-lightest;
}

  <input type="checkbox"/>

My Information

Header

Subheader

Info

Info

Info

Info

Info

Info

Info

Info

Info

Info

A: I reckon the issue is the hardcoded height, but ALSO, the absolute positioning. Just commenting out those helps.

label {
  -webkit-perspective: 1000px;
  perspective: 1000px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  width: 100%;
/*  height: 250px; */
  cursor: pointer;
}

.card {
  position: relative;
  height: 100%;
  width: 100%;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: all 600ms;
  transition: all 600ms;
  z-index: 20;
}

.card div, .card span {
  display: flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.card div {
 /*  position: absolute; */
  height: 100%;
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
}

.card .back {
  background: $color-lightest;
  color: $color-darkest;
  border: 1px solid $color-darkest;
  -webkit-transform: rotateX(180deg);
  transform: rotateX(180deg);
}

input {
  display: none;
}

:checked + .card {
  transform: rotateX(180deg);
  -webkit-transform: rotateX(180deg);
}

.icon-color, .icon-background {
  color: $color-accent-light;
}

.front.icon-color {
  z-index:100;
}

.card .front, .card .back {
  padding:1.5em;
}

.card .front {
  background: $color-darkest;
}

.title{
  text-align:center;
  color: $color-lightest;
}

  <input type="checkbox"/>

My Information

Header

Subheader

Info

Info

Info

Info

Info

Info

Info

Info

Info

Info


text:
Q: Subtable Reference Numbers Start at Zero I have a latex document with a table that contains two subtables.  When I reference the entire table it the numbering starts at 1, but when I reference one of the individual subtables the numbering starts with 0. Here is an example of my setup:
% In my preamble
\usepackage[tight,footnotesize]{subfigure}

% In my document section
\section{Section}
\subsection{Sub Section}

% My Table
\begin{table}[ht]
  \centering
  \subtable[Sub Table 1]
  {
    \label{tbl:sub-table-1}
    \centering
    \begin{tabular}{ l c }
      \textbf{A} & \textbf{B} \\
      1 & 2 \\
      2 & 3 \\
    \end{tabular}
  }
  \subtable[Sub Table 2]
  {
    \label{tbl:sub-table-2}
    \centering
    \begin{tabular}{ l c }
      \textbf{A} & \textbf{B} \\
      1 & 2 \\
      2 & 3 \\
    \end{tabular}
  }
  \caption{Sub Tables}
  \label{tbl:table-1}
\end{table}

This it my sub table \ref{tbl:sub-table-1}. % Comes out 0(a) instead of 1(a)
This is my table \ref{tbl:table-1}. % Comes out to 1 as you expect

A: subfigure is an obsolete package and shouldn't be used anymore. You can use the subcaption package instead:
\documentclass[11pt]{article}
\usepackage{caption}
\usepackage{subcaption}

\captionsetup[subtable]{font=footnotesize}

\begin{document}

\section{Section}
\subsection{Sub Section}

\begin{table}[ht]
  \begin{subtable}{.5\textwidth}
  \centering
  \subcaption{Subtable 1}
  \begin{tabular}{ l c }
    \textbf{A} & \textbf{B} \\
    1 & 2 \\
    2 & 3 \\
  \end{tabular}
  \label{tbl:sub-table-1}
  \end{subtable}
  \begin{subtable}{.5\textwidth}
  \centering
  \subcaption{Subtable 2}
  \begin{tabular}{ l c }
    \textbf{A} & \textbf{B} \\
    1 & 2 \\
    2 & 3 \\
  \end{tabular}
  \label{tbl:sub-table-2}
  \end{subtable}
  \caption{Sub Tables}
  \label{tbl:table-1}
\end{table}

This it my subtable~\ref{tbl:sub-table-1}.
This is my table~\ref{tbl:table-1}.

\end{document}

EDIT: I added the \captionsetup command (to change the font size for the subtable captions).


text:
Q: android listview message among two different layouts | have almost got my application working. Now i am in final stage. I am struck with an issue to display sent and received message in dynamic listview. Based on data sent or received i need to display the text in listview. I am able to view sent message in. I am able to receive the message from receiver but i am unable to display that in a listview.
sample code:
public View getView(int position, View convertView, ViewGroup parent) {
            LayoutInflater inflater = getLayoutInflater();
             View row;
             String query = null;
             // String even_color, odd_color;
             SharedPreferences prefList = getSharedPreferences("PrefsFile",
                    MODE_PRIVATE);
             if(query == data){
                row = inflater.inflate(R.layout.list_row_layout_odd,     parent,
                        false);
                TextView textLabel = (TextView)     row.findViewById(R.id.text);
                textLabel.setText(data);
            }
             else
            {
                    row =     inflater.inflate(R.layout.list_row_layout_even, parent,
                        false);
                TextView textLabel = (TextView)     row.findViewById(R.id.text);
                textLabel.setText(datas);
            }
            return row;
        }
    }

If i sent message i need to display the msg in ie(list_row_layout_odd) and if i recieve message i need to display in (list_row_layout_even) layout.
please help me in solving this issue.
Thanks in advance.


text:
Q: Set a Thumbnail to a mp3 file Is there a way to manually set/change the Thumbnail of an .mp3 file?
Is there any section in the mp3 file where the tags and the thumbnail are stored, or maybe some freeware wich allows me to do so?
Iam Using windows 7 professional x64.

A: USe applications like n7 player which automatically generate thumbnail or you can download.
https://play.google.com/store/apps/details?id=com.n7mobile.nplayer&hl=en


text:
Q: Syntax for writing to file c++ class State{
private:
    double _timestamp; // time stamp at which this state is measured
    double _xpos; // vehicle position, forward (x1)
    double _ypos; // vehicle position, left/right (x2)
    double _tire_angle; // tire angle (radians) (x3)
    double _heading; // heading (radians) (x4)

public:
     // constructs a new State object with these initial values
     State(double x1, double x2, double x3, double x4, double timestamp);
     // constructs an empty State object
     State();

     double getXPos() const; // returns the _xpos
     void setXPos(double xpos); // sets the _xpos
     double getYPos() const; // returns the _ypos
     void setYPos(double ypos); // sets the _ypos
     double getTireAngle() const; // returns the _tire_angle
     void setTireAngle(double angle); // sets the _tire_angle
     double getHeading() const; // gets the _heading
     void setHeading(double heading); // sets the _heading
     double getTimeStamp() const; // gets the _timestamp
     void setTimeStamp(double timestamp); // sets the _timestamp
};

class DataSink{
private:
    vector<State> sink;
public:
    void setSink(State x);
    void printSink(char* fileName);
};

void DataSink::printSink(char* fileName){
    int i;
    ofstream outFile;

    outFile.open(fileName);

    if (!outFile.is_open())
    {
        cout << "Could not open file " << fileName << endl;
        return;
     }

    for (i = 0; i < sink.size(); ++i)
    {
        outFile << sink.at(i).getXPos() << "," << sink.at(i).getYPos()<< "," << sink.at(i).getTireAngle()<< "," << sink.at(i).getHeading()<< "," << sink.at(i).getTimeStamp() << endl;
    }

    outFile << "Test.\n";

    outFile.close();

    return;
 }

So this code is suppose to copy the vector sink, of another object type, onto a file. When I go step by step through my functions all the values are where they should be, but the file I'm writing to is just empty. I added the "test" to see if it was my vectors/values that were jacked up... but even that doesn't print. It's not telling me "could not open file" either.
Thank you in advance for you help and expertise.


text:
Q: Is there a failed block for Alamofire? I'm using Alamofire with Swift kind of this way:
    Alamofire.request(.GET, urlString)
    .authenticate(usingCredential: credential)
    .response {
        (request, responseJSON, data, error) in [..and so on]

Now I wonder how I can execute some code in case the server is e.g. completely down. Something like a failed block in ObjC.
I know that I can call something like this to get an error code:
        if let response = responseJSON {
            var statusCode = response.statusCode
            println("-->statusCode: \(statusCode)")

        }

But in the case that I can't reach the server, the .response closure won't execute, so there is no error message.
How is this handled?

A: If you can't reach the server, you will receive a NSURLErrorDomain error via the error variable in the closure.


text:
Q: Let $a,b\in \mathbb R$. Show if $a\leq c$ for every $c > b$, then $a≤b$.
Let $a,b\in \mathbb R$.  Show if $a≤c$ for every $c > b$, then $a≤b$.

I tried doing a proof by use of the contrapositive, but I can't manage to make it work. If someone could provide some guidance that would be appreciated

A: Simple contradiction. Assume $a>b$ and consider $c = \frac{a+b}{2}$.
Now $c=\frac{a+b}{2}>\frac{b+b}{2}=b$, but $c=\frac{a+b}{2}<\frac{a+a}{2}=a$

A: Suppose $a>b$. Choose $\epsilon>0$ small enough such that $c=b+\epsilon<a$. It is a contradiction because $c>b$.


text:
Q: No qualifying bean of type 'tn.esen.dao.StudentRepository' available i'm developing a crud application with SPRING and as usual, I faced a problem saying that no qualifying beans is available and didn't even add the student table in the database.
this is the problem:

Exception in thread "main" org.spring framework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'tn.esen.dao.StudentRepository' available

entity:
package tn.esen.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

@Entity
@Table(name="etud")
public class Student {

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;

    private String nom;

    private String prenom;

    private Double moyenne;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    public Double getMoyenne() {
        return moyenne;
    }

    public void setMoyenne(Double moyenne) {
        this.moyenne = moyenne;
    }

    public Student() {
        super();
        // TODO Auto-generated constructor stub
    }
}

controller:
package tn.esen.control;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import tn.esen.dao.StudentRepository;
import tn.esen.entity.Student;

@Controller
public class MycontrolStudent {

    @Autowired
    public StudentRepository metier;

    @RequestMapping(value="/index")
    public String home(Model mymodel) {

        //importing the list of all students
        List<Student> allstudents= metier.findAll();
        //adding an attribute to the model contain the list of students
        mymodel.addAttribute("listestudent",allstudents);
        return ("acceuil");

    }
}

repository:
package tn.esen.dao;

import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import tn.esen.entity.Student;

@Repository
public interface StudentRepository extends JpaRepository<Student,Long> {

}

main program:
package com.example.demo;

import java.util.List;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import tn.esen.dao.StudentRepository;
import tn.esen.entity.Student;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        ApplicationContext ctx =  SpringApplication.run(DemoApplication.class, args);

        StudentRepository StudentRepository = ctx.getBean(StudentRepository.class);

        List<Student> allstud = StudentRepository.findAll();
         System.out.println("--------------------list of students-----------------------");

         for(Student stud:allstud) {
             System.out.println(stud);
         }
    }
}

A: Your StudentRepository is in a complete different package: tn.esen.dao
You should add @ComponentScan(basePackages = "tn.esen")
to your DemoApplication.java


text:
Q: textfield fires EditingChanged three times? This is when i input "input" and click the return button.

[_textField addTarget:self action:@selector(textFieldValueChanged:) forControlEvents:UIControlEventEditingChanged];

- (IBAction)textFieldValueChanged:(id)sender {
    NSLog(@"%@",_textField.text);
}


text:
Q: No sound under IPv6 issue of iOS I have an app that makes users talk each other with Sinch SDK(app to app),Sevaral days ago, the app was rejected by AppStore because of no sound under IPv6 environment, following is what they said:

Performance - 2.1 We still found that there is no sound during the
  call.  Next Steps Please run your app on a device while connected to
  an IPv6 network (all apps must support IPv6) to identify any issues,
  then revise and resubmit your app for review.

But I tested it works fine under ipv4 and ipv6(shared wifi with NAT64 on mac) environments, and I can't reproduce the no sound issue.
I didn't use other api from other servers.
Did anyone has the same issue?
Does Sinch support IPv6? (I read it supported after iOS SDK 3.9.8)

This is my testing environment:
iOS:10.2
Device: iPhone6s
Sinch SDK: 3.9.8

Thanks

A: Update to iOS 3.10 and it should all be good


text:
Q: Interval between two Dates I have a few question about Dates in Oracle.
Is it possible to get the interval (in days) between two DATE types? If yes, is it possible to do a statement (an insert into for example) for each day in this interval?
I thought about
while (a_sequence != difference_between_dates)
LOOP
a_sequence.next
-- do things
END LOOP;

Is it possible to get that interval with periodic gaps? (Like every week-end for example. Is there a modulo operator in Oracle?)
I thought about something like if(a_sequence % 6 || a_sequence % 7) as condition to do things only in week-end for example (assuming the lower date is always Monday).
Is it possible to do my_date+1 to get the next day ?

A: Sure.  If you're looking for a PL/SQL solution (you can do it in pure SQL but it's probably a bit harder to read), something like
DECLARE
  l_first_date date := date '2015-01-01';
  l_last_date  date := date '2015-12-31';
  l_date_to_check date;
BEGIN
  FOR i IN 1 .. l_last_date - l_first_date
  LOOP
    l_date_to_check := l_first_date + i;
    if( to_char( l_date_to_check, 'DY' ) IN ('SAT', 'SUN') )
    then
      <<do_something>>
    end if;
  END LOOP;
END;

This assumes that your database is using an English language locale (different languages obviously have different abbreviations for days).  You can make the code a bit more robust by specifying the NLS settings you want in the to_char function but for most systems, that's adding complexity to the code that is never going to be needed.

A: May this code help you
    DECLARE
   first_date   DATE := TO_DATE ('01012015', 'DDMMYYYY');
   last_date    DATE := TO_DATE ('31012015', 'DDMMYYYY');
   a_sequence   NUMBER := 25;
BEGIN
   LOOP
      IF a_sequence = last_date - first_date
      THEN
         EXIT;
      END IF;

      DBMS_OUTPUT.put_line ('Sequence=' || a_sequence);
      a_sequence := a_sequence + 1;
   END LOOP;
END;

A: CREATE PROCEDURE `sp_calcula_intervalo`(
    IN `p_fl_frequency` VARCHAR(2),
    IN `p_dt_start` VARCHAR(10),
    IN `p_dt_ends` VARCHAR(10),
    OUT `p_qt_ocorrs` INT
)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT 'Calculates the interval between two dates'
BEGIN

    -- ------------------------------------------------------------------------------
    -- This code was written for Mysql
    -- ------------------------------------------------------------------------------
    --   Calculates the interval between two dates
    --   In Weeks, Fortnights, Months, Bimonths, Quarters, Semesters and Years
    --   CALL sp_calcula_intervalo('3M', '2020-01-31', '2020-05-31', @p_qt_ocorrs);
    -- ------------------------------------------------------------------------------

    -- ------------------------------------------------------------------------------
    -- Work Variables
    -- ------------------------------------------------------------------------------

    DECLARE dt_calc        DATE DEFAULT NULL;
    DECLARE dt_start           DATE DEFAULT NULL;
    DECLARE dt_ends              DATE DEFAULT NULL;
    DECLARE dt_proximo_mes      DATE DEFAULT NULL;

    DECLARE va_result        INT            DEFAULT 0;
    DECLARE va_msg              varchar(1000)  DEFAULT '';
    DECLARE va_end_loop              char(1)        DEFAULT 'N';

    DECLARE va_dd_start       char(2)  DEFAULT '00';
    DECLARE va_mm_start       char(2)  DEFAULT '00';

    DECLARE va_dt_next_mm_calc char(10)  DEFAULT '0000-00-00';
    DECLARE va_dd_calc            char(2)  DEFAULT '00';
    DECLARE va_mm_calc            char(2)  DEFAULT '00';

    -- ------------------------------------------------------------------------------
    -- Values Start
    -- ------------------------------------------------------------------------------

   SET va_dd_start = SUBSTR(p_dt_start, 9, 2);
   SET va_mm_start = SUBSTR(p_dt_start, 6, 2);

    SET dt_calc  = STR_TO_DATE(p_dt_start,'%Y-%m-%d');
    SET dt_start = STR_TO_DATE(p_dt_start,'%Y-%m-%d');
    SET dt_ends  = STR_TO_DATE(p_dt_ends,'%Y-%m-%d');

    SET va_result  = 1;

    -- ------------------------------------------------------------------------------
    -- Loop de Calc
    -- ------------------------------------------------------------------------------

    WHILE (va_end_loop = 'N') DO

        SELECT

            CASE  p_fl_frequency

                   WHEN '1M'  THEN ADDDATE(dt_calc,  INTERVAL 1 MONTH)
                   WHEN '2M'  THEN ADDDATE(dt_calc,  INTERVAL 2 MONTH)
                   WHEN '3M'  THEN ADDDATE(dt_calc,  INTERVAL 3 MONTH)
                   WHEN '4M'  THEN ADDDATE(dt_calc,  INTERVAL 4 MONTH)
                   WHEN '6M'  THEN ADDDATE(dt_calc,  INTERVAL 6 MONTH)
                   WHEN '12M' THEN ADDDATE(dt_calc,  INTERVAL 12 MONTH)
                   WHEN '1W'  THEN ADDDATE(dt_calc,  INTERVAL 1 WEEK)
                   WHEN '2W'  THEN ADDDATE(dt_calc,  INTERVAL 2 WEEK)

            END   INTO  dt_proximo_mes;

         SET va_result = va_result + 1;

         set va_dt_next_mm_calc = DATE_FORMAT(dt_proximo_mes, '%Y-%m-%d');
         SET va_dd_calc            = SUBSTR(va_dt_next_mm_calc, 9, 2);
         SET va_mm_calc            = SUBSTR(va_dt_next_mm_calc, 6, 2);

         if p_fl_frequency not in ('1W', '2W') then
             if va_dd_calc <> va_dd_start then

                if va_mm_calc <> '02' then -- Fevereiro

                   if va_mm_calc in ('04', '06', '09', '11') then  -- Meses com 30 dias
                      set va_dt_next_mm_calc = concat(SUBSTR(va_dt_next_mm_calc, 1, 8),'30');
                   else
                      if va_dd_start = '30' then
                         set va_dt_next_mm_calc = concat(SUBSTR(va_dt_next_mm_calc, 1, 8),'30');
                      else
                         set va_dt_next_mm_calc = concat(SUBSTR(va_dt_next_mm_calc, 1, 8),'31');
                      end if;
                   end if;
                end if;
             end if;
         end if;

            SET dt_calc = STR_TO_DATE(va_dt_next_mm_calc,'%Y-%m-%d');

          if dt_calc >= dt_ends then

             set va_end_loop = 'S';

             if dt_calc > dt_ends then
               SET va_result = va_result - 1;
             end if;

        end if;

    END WHILE;

    -- ------------------------------------------------------------------------------
    -- Return Calc
    -- ------------------------------------------------------------------------------

    select va_result as p_qt_ocorrs;

END


text:
Q: How to download a file from box using wget? I've created a direct link to a file in box:

The previous link is to the browser web interface, so I've then shared with a direct link:

However, if I download the file with a wget I receive garbage.
How can I download the file with wget?

A: I might be a bit late to the party, but FWIW:
I tried to do the same things in order to download a folder.
I went to the box UI and opened the browser's network tab on the developer tools.
Then I clicked on download and copied as cURL the first link generated, it was something like (removed many headers and options for readability)
curl 'https://app.box.com/index.php?folder_id=122215143745&rm=box_v2_zip_folder'

The response of this request is a json object containing a link for downloading the folder:
{
  "use_zpdl": "true",
  "result": "success",
  "download_url": <somg long url>,
  "progress_reporting_url": <some other url>
}

I then executed wget -L <download_url> and was able to download the file using wget

A: The solution was to add the -L option to follow the HTTP redirect:
wget -v -O myfile.tgz -L https://ibm.box.com/shared/static/xxxxx.tgz

A: I was able to download the file by making the link public, then replacing /s/ in the url with /shared/static
So my final command was:
curl -L  https://MYUNI.box.com/shared/static/EXAMPLEtzwosac6pz --output myfile.zip

This can probably be modified for wget.

A: What you can do in 2022 is something like this:
wget "https://your_university.app.box.com/index.php?rm=box_download_shared_file&vanity_name=your_private_name&file_id=f_your_file_id"

You can find this link in the POST method in an incognito under Google Chrome's network tab. Note that the double quotes escape characters.


text:
Q: How to use simple JPA on Spring Boot i am learning Spring Boot and trying to test the JPA
i have taken the "https://spring.io/guides/gs/accessing-data-jpa/" exemple
and i have also tried on a simple initializr project with only data-jpa and h2
But i always got the same error
Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

Property: driverclassname
Value: org.postgresql.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class org.postgresql.Driver in either of HikariConfig class loader or Thread context classloader

Action:

Update your application's configuration

i have read many post about this but it always come with a lot of different configurations and solutions
the fact is, it's just a simple program from 0, taken from initializr or the getting started course it should work with no specific configuration (i guess)
is that a computer configuration that is missing or do i really need to add a lot of application properties to make it work?
thank you
(sorry for my bad english ^^')

A: The link which you shared doesn't talk about DB configuration.
Spring Boot requires DB configuration at boot time.
Please add following config in application.properties
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=username
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

Refer here for more detail

A: Add the next properties to your application.properties file
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

Add a data.sql file in src/main/resources with the next content:
DROP TABLE IF EXISTS customer;

CREATE TABLE customer (
  id INT AUTO_INCREMENT  PRIMARY KEY,
  first_name VARCHAR(250) NOT NULL,
  last_name VARCHAR(250) NOT NULL
);


text:
Q: Facebook share button to post multiple times from the same url Does Facebook have a share button similar to "Tweet". The goal is to allow users to share the content of the webpage(with the same url) multiple times to their walls. The content of the webpage changes but the url doesn't. I know tweet will work in this situation, but I couldn't find anything on Facebook social plugins that will allow me to do that. Any ideas?

A: Why not use the simple share or like button but use dynamic og meta tags?


text:
Q: Maven Build Asks for log file and (Permission Denied) I have an opensource Maven project which I downloaded from GitHub.The project is called ElasticInbox (https://github.com/elasticinbox/elasticinbox.git).
When I try to build the project I get the following error:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/var/log/elasticinbox/elasticinbox.log,true) call failed. java.io.FileNotFoundException: /var/log/elasticinbox/elasticinbox.log (Permission denied)
at java.io.FileNotFoundException: /var/log/elasticinbox/elasticinbox.log (Permission denied)
at  at java.io.FileOutputStream.open0(Native Method)
at  at java.io.FileOutputStream.open(FileOutputStream.java:270)
at  at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at  at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28)
at  at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:149)
at  at ch.qos.logback.core.FileAppender.start(FileAppender.java:108)
at  at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:72)
at  at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
at  at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:318)
at  at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:197)
at  at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:183)
at  at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at  at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157)
at  at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143)
at  at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106)
at  at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56)
at  at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at  at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at  at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at  at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at  at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at  at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
at  at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
at  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
at  at org.ops4j.pax.web.extender.war.internal.Activator.<clinit>(Activator.java:58)
at  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at  at java.lang.Class.newInstance(Class.java:442)
at  at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
at  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at  at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at  at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at  at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at  at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at  at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at  at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at  at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at  at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at  at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at  at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

Initially the error was file not found then I manually created this log file via the terminal. As far as I understand, this is not the project code which is executing. It seems to be the maven build which is throwing this error and I a not able to proceed further.
Can someone please help me to resolve this issue?

A: Just encountered the exactly same issue, you can have the following check:

*

*ensure the path is correct - prefixed with / means an absolute;

*the current user has proper permission to write into the file - check it with sudo ls -alh path_to_the_file, if not then use sudo chown -R user:user the_parent_folder_name to change it;

I fixed it by removing the entire folder first and then create a new folder with proper owner.

A: Because the access to your file location is not shared with others. Hence you are getting permission denied issue.
In logback.xml file, https://github.com/elasticinbox/elasticinbox/blob/master/config/logback.xml
the location of log file has been specified. Try changing its path to your user dir, it should work.


text:
Q: Fetch data and create file I have a React UI that has an export button. On clicking of this export button, a CSV file needs to be generated and downloaded to client end.
CSV could contain 5 different columns i.e., Name, Address etc. There are approx. 80,000 rows. Also, rows may not have unique data.
I also need to show the file exporting progress back to UI.
User can use filters in order to get new rows (may include previous rows). Then exporting should not re-fetch all cell data (Caching should be done).
Resouces:

*

*I have APIs (5 APIs for 5 columns) to fetch these cell data (based on Id) from backend (lambda with load balancer).

*CANNOT start the stream of that data.

What is the best way (most optimal) to do it in order to:

*

*Export the CSV faster

*Does not hangs the UI in middle

*User's primary memory is not used heavily

Tried Web Worker with IndexedDB (for fetching data on different thread and caching it)
Using blob to create CSV once blob is ready with data (Issue: blob is stored in browser's memory)
Data needs to be either save directly to CSV but not in browser cache or primary storage. (As file could be large)
Still multiple requests are being made since fetch requests are made asynchronously. So, there are chances for common requests.


text:
Q: Access 2010 SQL query works fine by itself but not when linked to access db Access 2010 inventory db of items (item, location, qty etc...).
Linked SQL server 2005 tables of orders.
I've created an Access SQL query to retrieve a list of items for a particular order number. This runs fine by itself, but when I add links to my Access db, asking it for the location and qty, it only shows results for 1 item (last item)?
I feel like I'm missing something simple. I somewhat know my way around access but not so much in SQL and basically new to any programming languages.
Since I can't post photos yet I'll attempt to show examples of what is returned.
SQL Order query
Headers Order_no, Item_no
Results 00123, 77000; 00123, 77013; 00123, 77006; 00123, 77010; etc...
SQL order query with inventory
Headers Order_no, Item_no, Location, Qty
Results 00123, 77006, bin3, 24; 00123, 77006, bin4, 32; 00123, 77006, bin7, 21; 00123, 77006, bin14, 10.
Any ideas would be appreciated. Thanks!


text:
Q: how to publish a react js website on gitlab i created a static react js project and i pushed it to git-lab excluding node modules. But now i am not able to publish my website it is showing deploy failed. but the build was successful. i know that i should make some changes to packagejson file but i dont know what all changes to be done. kindly please guide me in this issue
npm ERR!     npm bugs my-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls my-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /builds/Adithyets/react-website/npm-debug.log
Cleaning up file based variables
ERROR: Job failed: exit code 1


text:
Q: javascript iframe resize at every load I want to resize an iframe every time a new link is accessed inside that iframe.
I have a wordpress blog and I added the forum on a page using this iframe. I want it resized every time I click on a link on that blog.
I googled but I found nothing relevant.
This is the code I am using for my resize

Thank you!

A: I'm not an expert, but it could be that the iframe was only loaded one time?... extrange...
I don't know, but I think that you could add one onclick function to every link of the blog to launch the sizeIframe function instead of the onload.
For example (this code is an idea, not tested)...
 a link
 b link


text:
Q: Edge indices of array with cube data If I have array representing a cube with side length of n, the array length is n * n * n.
If for example n=4 and array is 64 long, I want to have a list of the indices that are at the outer layer of the cube. So something like 0-15, 16-19, 20, 23, 24, 27, 28-31, 32-35, 36, 39, 40, 43, 44-47, 48-63.
I know it is some creative use of mod and div, but I'm getting confused.

A: procedure TForm1.Button1Click(Sender: TObject);
var
I, n: Integer;
begin
Memo1.Lines.Clear;
n := 4;
for I := 0 to n*n*n-1 do
begin
  if (I mod n) = 0 then
    Memo1.Lines.Add(I.ToString + '  X min')

  else if (I mod n) = (n-1) then
    Memo1.Lines.Add(I.ToString + '  X max')

  else if ((I div n) mod n) = 0 then
    Memo1.Lines.Add(I.ToString + '  Y min')

  else if ((I div n) mod n) = (n-1) then
    Memo1.Lines.Add(I.ToString + '  Y max')

  else if ((I div n) div n) = 0 then
    Memo1.Lines.Add(I.ToString + '  Z min')

  else if ((I div n) div n) = (n-1) then
    Memo1.Lines.Add(I.ToString + '  Z max')

  else
    Memo1.Lines.Add(I.ToString + '  ')
end;
end;

Produces a list:
0  X min
1  Y min
2  Y min
3  X max
4  X min
5  Z min
6  Z min
7  X max
8  X min
9  Z min
10  Z min
11  X max
12  X min
13  Y max
14  Y max
15  X max
16  X min
17  Y min
18  Y min
19  X max
20  X min
21
22
23  X max
24  X min
25
26
27  X max
28  X min
29  Y max
30  Y max
31  X max
32  X min
33  Y min
34  Y min
35  X max
36  X min
37
38
39  X max
40  X min
41
42
43  X max
44  X min
45  Y max
46  Y max
47  X max
48  X min
49  Y min
50  Y min
51  X max
52  X min
53  Z max
54  Z max
55  X max
56  X min
57  Z max
58  Z max
59  X max
60  X min
61  Y max
62  Y max
63  X max


text:
Q: Determine size of quadrat by point pattern analysis I'm working with a considerably large spatial point dataset that is irregularly spaced. As I want to average the data based on a particular quadrat size (essentially square grids) I was wondering if there is a general rule to determine the raster/grid size. After reading a few articles I ended up finding a formula which states that in 2 dimensions (2D), for square quadrats/grid/raster, the length of the side of a quadrat would be:
√(2A/N)

where, A= area, & N = number of points. If my data is scattered in 3D, say for example data collected from ocean has X, Y coordinates as well as depth, Z, what rule of thumb should be applied? Reference to a R statistical package to do such analysis would be appreciated. I tried "spatstat" package where functions like quadratcount(), quadrat.test() exist, but I'm looking for something that would suggest quadrat size based on the nature (distance, number of samples, denisty, etc.) of the data.


text:
Q: replace a word in a string if there is a given string using sed Consider the following strings:
function 12345 filename.pdf 6789 12
function 12345 filename.doc 7789 4567

Is there a way to search the strings using sed to see if they contain pdf or doc substrings, and replace the strings to the following?
function_pdf 12345 filename.pdf 6789 12
function_doc 12345 filename.doc 7789 4567

A: Using sed :
~$ cat i.txt
function 12345 filename.pdf 6789
function 12345 filename.doc 7789
function 12345 filename.txt 8888
~$ sed -e 's/\(function\) \(.*\)\(pdf\|doc\)\(.*\)/\1_\3 \2\3\4/' i.txt
function_pdf 12345 filename.pdf 6789
function_doc 12345 filename.doc 7789
function 12345 filename.txt 8888

Capture the extension with the regexp you want, then insert it where you want using \x notation.
From man sed:

the special escapes \1 through \9 to refer to the corresponding matching sub-expressions in the regexp.

A: You really have not specified the problem adequately, but perhaps you are looking for:
sed -e  '/\.pdf/s/function/function_pdf/g' -e /\.doc/s/function/function_doc/g'

A: Through sed,
$ sed 's/^\([^[:space:]]\+\)\( [^[:space:]]\+ [^[:space:]]\+\.\)\(pdf\|doc\)/\1_\3\2\3/g' file
function_pdf 12345 filename.pdf 6789 12
function_doc 12345 filename.doc 7789 4567

A: With awk:
awk '$1=="function" && ($3 ~ /\.(pdf|doc)$/) {$1=$1 "_" substr($3,length($3)-2)}7'

A: sed 's/\( .*\.\)\([^ ]*\)\(.*\)/_\2&/' YourFile

the simpliest sed i found for this (sed seems very efficient for this)


text:
Q: Openshift retrieve branch name in jenkinsfile I have configured webhook on bitbucket server which points to Openshift.
I want to get GIT repo url , git branch etc from webhook payload in my inline jenkinsfile but I dont know how to retrieve them. (Webhook triggers build though).
Is it possible ?
Here is my BuildConfig
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:

  labels:
    application: spring-demo
    template: openjdk18-web-basic-s2i
  name: spring-demo
  spec:
  output:
    to:
      kind: ImageStreamTag
      name: 'spring--demo:latest'
  runPolicy: Serial
  source:
    type: None
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
        pipeline {
        agent {
          label 'maven'
        }
        stages {
          stage('Build') {
            steps{
               sh "echo ${env.BRANCH_NAME}"  <<<<------------- this is null
            }
          }
        }
        }
    type: JenkinsPipeline
  triggers:
    - bitbucket:
        secretReference:
          name: yoyo
      type: Bitbucket

--Thanks.

A: According to this stack overflow question and some Jenkins documentation, you need to install the git plugin on your Jenkins instance. Then you will have the variable GIT_BRANCH and GIT_URL available to you via  ${env.GIT_BRANCH} and ${env.GIT_URL}. Make sure your branch names do not have slashes in them, (ex release/1.2.3) as this confuses a lot of key tools in Jenkins.
Alternatively as a last resort, in a Jenkins scripted pipeline you can set your own environment variables via parameter or defaults (like "master") if you know you won't change your branches often.


text:
Q: Unlocking Locked Out accounts using PowerShell (not with Quest AD cmdlets) I'm writing a GUI tool using PowerShell that is able to do most AD related tasks with just a user name and button click. I've done all the usual ones (Create / Remove Users, Create / Remove Security & Distribution Groups, Resetting Passwords, etc) but can't find away of unlocking a "Locked Out" account.
I'm trying to do this without using Quest AD cmdlets as I want a more stand alone solution. So I'm wondering whether is possible with plain PowerShell (1.0 or 2.0) in a Windows 2003 Domain.
Many thanks.

A: Set the lockoutTime property of the DirectoryEntry to 0.
Sample:
$x = [ADSI]'LDAP://SomeDN'
$x.lockoutTime = 0
$x.CommitChanges()
$x.Close()

A: Been out of the AD world for a few years. I haven't worked with PowerShell at all but does the link below offer what you're looking for?
http://dmitrysotnikov.wordpress.com/2007/08/14/enable-disable-unlock-user-accounts/


text:
Q: JQuery selectmenu set selected index on change I am trying to set the selected index of a select box / selectMenu on change back to the first option.
Here is my code so far
    $obj = $("<select class='class1' />");
    $obj.append("<option value='-1' selected='selected' class='icon1'>default</option>");
    $obj.append("<option value='0' class='icon2'>opt1</option>");
    $obj.append("<option value='1' class='icon2'>opt2</option>");
    $obj.append("<option value='2' class='icon2'>opt3</option>");

    $("#container").append($obj);
    $obj.selectmenu({
        transferClasses: true,
        icons: [
            {find: '.icon1', icon: 'ui-icon-flag'},
            {find: '.icon2', icon: 'ui-icon-plus'}
        ],
        change: function(){
            // doesn't work $(this).find("option:first").attr("selected","selected");
            // doesn't work $(this).selectedIndex = 0;
            // doesn't work $(this).val(-1);
            // doesn't work $(this).val("-1");
            // doesn't work $(this).val("");
        }
    });

Look at this Fiddle, The top dropdown menu I have altered. If you change the value, and re-open the dropdown menu the selected value 'jumps' to the one i changed it to. I want it to be there once i select any value.

A: This seems to work for me:
$("select").change(function(){
    $('select :first-child').attr('selected','selected');
});

http://jsfiddle.net/CzRWD/
or if you'd rather use $(this) you can do:
$("select").change(function(){
    $(this).children(":first").attr('selected','selected');
});

http://jsfiddle.net/CzRWD/1/
UPDATE
After a bit of playing around and quite a lot of research, I discovered that the way to change the index in the selectmenu plugin is to use the value property and pass in the value of the item you want to select.
This is done inside the change event:
$(this).selectmenu("value",$(this).children(":first").val());

Here's a working example using your jsfiddle: http://jsfiddle.net/GXtpC/86/


text:
Q: How do I identify a COM calling client? I have a COM DLL - Is there a way of identifying the application that is using it (calling a method within the DLL)? I tried
System.Reflection.Assembly.GetCallingAssembly().GetName().ToString();

but that does not identify the client.


text:
Q: How to set a multicharacter record separator RS in GNU awk so it encompasses the new lines? I am using GNU Awk 4.1.3. I want to process this file:
$$$$
1
1
$$$$
2
2
$$$$
3
3
$$$$
1
clave
2
$$$$
5
5
$$$$

And print the block of lines that go between "$$$$" and the next "$$$$" when that given block contains the text "clave" in it. That is, with the given example I want this output:
1
clave
2

My solution is to set the record separator RS to the string "$$$$". Since it is a special character, I need to escape it, so it ends up being like RS='\\$\\$\\$\\$':
awk -v RS='\\$\\$\\$\\$' '/clave/' file

The problem with this is that the result contains a new line before and after the block:
$ awk -v RS='\\$\\$\\$\\$' '/clave/' file

1
clave
2

This is because there is a new line between the end of "$$$$" and "1", and there is also a new line between "2" and the next "$$$$".
To avoid this, I am adding the new line on both ends of the record separator, so it becomes RS='\n\$\$\$\$\n'. It works well:
$ awk -v RS='\n\\$\\$\\$\\$\n' '/clave/' file
#            ^^^           ^^
1
clave
2

However, this becomes quite complex and I am wondering if including the new line in the record separator may have some side effects that I am not aware of.
For this, I wonder: how can I set the record separator so it encompasses the new lines? Is my approach valid or should I go for other options because my approach has some drawbacks?

A: You should be matching on the newline before and after the 4 $s as THAT is the real separator (a string of 4 $s on a line of it's own), anything else could fail if 4 $s appeared in your data. The first sting of $s won't have a newline before it of course, it'll match the start-of-string indicator (^) instead, so you need to use:
$ awk -v RS='(^|\n)[$]{4}\n' '/clave/' file
1
clave
2

I find [$] easier to read than \\$, YMMV.

A: You are getting a newline before and after because there is a new line before and after $$$$ in your file and by setting RS to $$$$ you are leaving those line breaks in record.
Change your RS to include a newline or start before and a newline or end afterwards, so that a record will be without those line breaks:
awk -v RS='(^|\n)\\${4}(\n|$)' '/clave/' fike

1
clave
2

Also note that you can use fix length quantifier \\${4} instead of \\$\\$\\$\\$.


text:
Q: How to calculate eigenvector centrality for specific nodes, r, igraph I'm using the igraph package in r.
I have an undirected, weighted network of about 1000 nodes and i want the eigenvector centrality for a list of about 100 of them
evcent (graph, directed = FALSE, scale = TRUE, weights = NULL,
     options = igraph.arpack.default)

returns all 1000 ev centralities.
Is there a way to specify which nodes it returns ev centrality for?

A: ev <- evcent(graph, ...)$vector
ev[important]


text:
Q: Frama-c: save plugin analysis results in c file I'am new in frama-c. So I apologize  in advance for my question.
I would like to make a plugin that will modify the source code, clone some functions, insert some functions calls and I would like my plugin to generate a second file that will contain the modified version of the input file.
I would like to know if it is possible to generate a new file c with frama-c. For example, the results of the Sparecode and Semantic constant folding plugins are displayed on the terminal directly and not in a file. So I would like to know if Frama-c has the function to write to a file instead of sending the result of the analysis to the standard output.
Of course we can redirect the output of frama-c to a file.c for example, but in this case, for the plugin scf for example, the results of value is there and I found that frama-c replaces for example the "for" loops by while.
But what I would like is that frama-c can generate a file that will contain my original code plus the modifications that I would have inserted.
I looked in the directory src / kernel_services / ast_printing but I have not really found functions that can guide me.
Thanks.

A: On the command line, option -ocode <file> indicates that any subsequent -print will be done in <file> instead of the standard output (use -ocode "" after that if you want to print on stdout again). Note that -print prints the code corresponding to the current project. You can use -then-on <prj> to change the project you're interested in. More information is of course available in the user manual.
All of this is of course available programmatically. In particular, File.pretty_ast by defaults pretty-prints (i.e. output a C program) the AST of the current project on stdout, but takes two optional argument for changing the project or the formatter to which the output should be done.


text:
Q: Remove quotes for value that has integer value in the dictionary i have a json dictionary, i want to remove the quotes from the integer values throughout the json data.
[
  {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": "8.0"
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": "90"
      }
    ]
  }
]

when i pass the above object to a function (i.e)
def remove_quote_for_int_values(obj):
    print(expected_output_is_below)
    pass

The above is the json data i want to achieve something like below
[
  {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 90
      }
    ]
  }
]

A: First of all, that's a pretty strange JSON object if integer values are represented as string there.
But you can do the following:

*

*If you know what fields are integer:

def remove_quote_for_int_values(obj, fields):
    if isinstance(obj, list):
        return [remove_quote_for_int_values(el, fields) for el in obj]
    elif isinstance(obj, dict):
        result = {}
        for key, value in obj.items():
            if isinstance(value, dict) or isinstance(value, list):
                result[key] = remove_quote_for_int_values(value, fields)
            elif key in fields:
                result[key] = int(value)  # or the desired type (e.g. float)
            else:
                result[key] = value
        return result
    else:
        return obj

*If you don't know

def remove_quote_for_int_values(obj):
    if isinstance(obj, list):
        return [remove_quote_for_int_values(el) for el in obj]
    elif isinstance(obj, dict):
        result = {}
        for key, value in obj.items():
            if isinstance(value, dict) or isinstance(value, list):
                result[key] = remove_quote_for_int_values(value)
            else:
                try:
                    value = float(value)  # or any desired type
                except ValueError:  # TypeError when converting to `int`
                    pass
                result[key] = value
        return result
    else:
        return obj

Both solutions should work with nested objects too.

A: It's not pretty and there is probably a simpler and more effective way of doing this, but this works:
def remove_quote_for_int_values(obj):
    for book in obj:
        for book_info in book.values():
            for elem in book_info:
                for key, value in elem.items():
                    if value.isdigit():
                        elem[k] = int(value)

Output:
[{'book': [{'category': 'reference', 'author': 'Nigel Rees', 'title': 'Sayings of the Century', 'price': 8}, {'category': 'fiction', 'author': 'Evelyn Waugh', 'title': 'Sword of Honour', 'price': 90}]}]


text:
Q: Replace text with an image docx4j I have an word template. There is an word photo that has to be replaced with an image. This has to be done with Docx4Java.
How do I do this?

A: If specifically looking to replace a text with an image(which is not possible using docx4j as answered above), you can use replace bookmark with image as an alternative.
Just open your templated word file, position the cursor at desired location and insert->bookmark and name your bookmark.
I followed the instructions here to replace this bookmark with an image

A: Disclosure: I manage the docx4j project
The VariableReplace code doesn't handle images.
The best way to do this would be to use data bound content controls, specifically a picture content control pointing via XPath at a base-64 encoded image in an XML document (see Getting Started for details).
However, if you want to replace a word with an image, you can do so, but you'll have to write a bit of glue code.  It is pretty straightforward.
First, find the word. You can do this using XPath or TraversalUtil (again, see Getting Started for details).
Hopefully it is in a run (w:r/w:t) by itself. If not, you'll need to split the run up so you don't replace adjacent text.
Then, add the image.  See the sample ImageAdd.
I suggest you have a look at the XML created when you add an image in Word (ie save and unzip your docx, then look at document.xml). Take care that the XML representing the image is at the correct level (eg child of w:p).


text:
Q: SQL CLR Parallelism I have a stored procedure that call a CLR function. They are both on the same database. The CLR function calls a web service. The problem here is that the SQL timestamp is 40s earlier than the webservice timestamp. This means that either SQL or webservice cannot handle many calls in parallel.
I am able to see through the logs I keep when the SP was called. How can I see when the CLR function was called?

A: Is there anything in the stored procedure that executes before calling the SQLCLR function?
In general, if you want to see what is happening in real-time, you have three options:

*

*SQL Server Profiler

*Extended Events

*Database Audits

The first two will let you watch events as they happen, and you can see what the start times and duration of each statement are.
The third option, Audits, let you easily capture events to a log file that you can view via a system TVF. You can trap SCHEMA OBJECT ACCESS and then filter at the Server Audit level (required for either Database Audit Specifications or Server Audit Specifications) for objects having the name of either the stored procedure or the function. You won't get to see the level of detail that you get with the first two options, nor can you see a breakdown of individual statements within a stored procedure, but it is a fairly light-weight mechanism for capturing these events if they are happening when you aren't there to watch via the first two options.
That said, if you are seeing delays with a web service call, and if that web service call is being executed by more than 2 sessions concurrently, and if those concurrent web service calls are to the same URI, then you are running into the default max connections per URI limit, which is 2. When this limit is reached, all additional calls to that URI are on hold until one of the 2 calls completes. You can increase this max connections per URI by setting the ConnectionLimit property of the ServicePoint class, which itself is a property of HttpWebRequest (and any other *WebRequest):
_MyHttpWebRequest.ServicePoint.ConnectionLimit = 10;


text:
Q: Session in Different File PHP
*

*How to stop session hijacking? User will not be saving too much sensitive data in the site, but still i want to make it secure. I dont want to store any extra data in the MySQL.

*Can I save session data in 2 different file in the server and later check if they are same? For each user 2 same data will be stored in 2 session different file.

A: First, look at storing your sessions in a database http://www.devshed.com/c/a/PHP/Storing-PHP-Sessions-in-a-Database/
I don't know what you mean by storing extra data in the database, because sessions don't roll over browser restarts, you would need to keep any needed information in the database.
Second, I'm not sure, because you can write your own functions in php for session saving (look at above link) I suppose you could, but I don't understand why you would.  Maybe data redundancy, you could save them to two different databases.  But session data is considered volatile (doesn't save over restarts) so data stored there shouldn't be too important to need that type of redundancy.


text:
Q: parsing date string in perl I am trying to check whether a variable $test contains a valid date format by attempting to parse it with Date::Manip. It works as expected when the format is 'YYYY/MM/DD'. If I change the format to 'DD/MM/YYYY' (my $test="20/4/2012")  it's not working properly. I tried a config function for setting to uk date format but still it didn't work.
use Date::Manip qw(ParseDate );
my $test="20_4_2012";
#my $test="2012_4_20";

$test =~ s/_/\//g;

print $test;

$date=ParseDate($test);

if(!$date) {
  print "baddate : $date\n";
}

else {
  print "Guddate: $date\n";
}

A: You can do this using the Time::ParseDate which allows you to specify UK in it's arguments to the parser function.
use Time::ParseDate;

my $test="20/4/2012";

$time = parsedate($test, UK => 1);

A: What did your config function call look like? I can get your script to work by adding this:
Date_Init("DateFormat=non-US");

before the ParseDate. (And also adding Date_Init to the import list in the use)

A: Hopefully you've already found your solution :-)
But for the benefit of anyone passing through looking for some date parsing tools for Perl, I can highly recommend the core module Time::Piece -- it's insanely good at working out what you meant from any old date string.
The real answer to your specific question is "it depends what you mean by valid" of course.