What is loop0 and how do I e2fsck it?
EXT3-fs (sdd1): using internal journal
EXT3-fs (sdd1): mounted filesystem with ordered data mode
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts:
EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts:
Adding 4194296k swap on /dev/sdd2. Priority:-1 extents:1 across:4194296k SSD
kjournald starting. Commit interval 5 seconds
EXT3-fs (loop0): warning: maximal mount count reached, running e2fsck is
recommended
EXT3-fs (loop0): using internal journal
EXT3-fs (loop0): mounted filesystem with ordered data mode
(loop0) is mounted too many times. What is it? Is it important?
This is my fstab
#
# /etc/fstab
# Created by anaconda on Wed Nov 1 00:29:46 2000
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=9fac7ae7-9948-4612-88dc-e652fc4ceb73 / ext4
defaults 1 1
UUID=1daa52c7-a5da-464d-a4c7-2ee19ef017af /boot ext3
defaults 1 2
UUID=12649fb1-fd53-4558-8a2a-79692ada8b19 swap swap
defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/usr/tmpDSK /tmp ext3 defaults,noauto
0 0
/dev/sda1 /home1 auto
auto,noatime,defaults 0 2
/dev/sdb1 /home2 auto
auto,noatime,defaults 0 2
/dev/sdc1 /home3 auto
auto,noatime,defaults 0 2
Tuesday, 20 August 2013
mongoid update elements within array
mongoid update elements within array
I am using mongoid 3.1 with Ruby 1.9.3 and I am trying to update a value
within an array. I can successfully perform the following command in
mongodb's CLI, but can't seem to find the appropriate solution/translation
for mongoid.
user.update( { activities: { $elemMatch: { uuid: "1111111-xxxx-xxxx" }}},
{ $set: { 'activities.$.submitted': true }})
For context the document looks like:
{
"_id" : ....,
"user_name" : "bob",
"activities: [
{
uuid: "1111111-xxxx-xxxx",
submitted: true,
},
{
uuid: "222222-xxxx-xxxx",
submitted: false,
},
{
uuid: "333333-xxxx-xxxx",
submitted: false,
}
]
}
The goal is to change submitted to true based on the uuid value. From what
I can tell, all of the "updating" solutions in mongoid only deal with the
attributes at the root of the document and can't have options for the $
positional operator.
Any help would be appreciated.
Thank you
I am using mongoid 3.1 with Ruby 1.9.3 and I am trying to update a value
within an array. I can successfully perform the following command in
mongodb's CLI, but can't seem to find the appropriate solution/translation
for mongoid.
user.update( { activities: { $elemMatch: { uuid: "1111111-xxxx-xxxx" }}},
{ $set: { 'activities.$.submitted': true }})
For context the document looks like:
{
"_id" : ....,
"user_name" : "bob",
"activities: [
{
uuid: "1111111-xxxx-xxxx",
submitted: true,
},
{
uuid: "222222-xxxx-xxxx",
submitted: false,
},
{
uuid: "333333-xxxx-xxxx",
submitted: false,
}
]
}
The goal is to change submitted to true based on the uuid value. From what
I can tell, all of the "updating" solutions in mongoid only deal with the
attributes at the root of the document and can't have options for the $
positional operator.
Any help would be appreciated.
Thank you
Why do some assembly references have a version and others not when added through NuGet
Why do some assembly references have a version and others not when added
through NuGet
I'm adding all packages through NuGet, so I'm not manually tweaking the
Specific Version property in Visual Studio. However depending on which
package (or even which version) I add, I end up with different ways of how
the reference is added. As you can see below:
A reference to Autofac is added without a version.
A reference to AutoMapper is added, but the assembly version is added as
well. Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL"
Even stranger is the fact that the stable NuGet package of AutoMapper
doesn't add the version either (make sure you save the csproj file between
changing packages). What's the reason that packages added through the same
method (NuGet install package) results in different configurations?
<Reference Include="Autofac">
<HintPath>..\packages\Autofac.3.1.1\lib\portable-win+net40+sl50+wp8\Autofac.dll</HintPath>
</Reference>
<Reference Include="AutoMapper, Version=3.0.0.0, Culture=neutral,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AutoMapper.3.0.0-ci1043\lib\windows8\AutoMapper.dll</HintPath>
</Reference>
through NuGet
I'm adding all packages through NuGet, so I'm not manually tweaking the
Specific Version property in Visual Studio. However depending on which
package (or even which version) I add, I end up with different ways of how
the reference is added. As you can see below:
A reference to Autofac is added without a version.
A reference to AutoMapper is added, but the assembly version is added as
well. Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL"
Even stranger is the fact that the stable NuGet package of AutoMapper
doesn't add the version either (make sure you save the csproj file between
changing packages). What's the reason that packages added through the same
method (NuGet install package) results in different configurations?
<Reference Include="Autofac">
<HintPath>..\packages\Autofac.3.1.1\lib\portable-win+net40+sl50+wp8\Autofac.dll</HintPath>
</Reference>
<Reference Include="AutoMapper, Version=3.0.0.0, Culture=neutral,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AutoMapper.3.0.0-ci1043\lib\windows8\AutoMapper.dll</HintPath>
</Reference>
Load random websites on page load
Load random websites on page load
Is there any option to open random pages in different tabs (in new tabs),
on page load
Regards http://www.idea-ads.com/
Is there any option to open random pages in different tabs (in new tabs),
on page load
Regards http://www.idea-ads.com/
Changed Discovery Behavior of Alternative MinGW in Eclipse-CDT(8.2) Bundled in Kepler-version(4.3)
Changed Discovery Behavior of Alternative MinGW in Eclipse-CDT(8.2)
Bundled in Kepler-version(4.3)
When using an alternative MinGW version like e.g.,
mingwbuilds-gcc/g++-4.8.1, the CDT(8.2) bundled in the latest
Kepler-version(4.3) is not able to discover it as a MinGW tool chain. This
behavior is introduced with this latest release.
The MinGW discovery process works fine on such an alternative MinGW in
previous releases like Juno-SR2 bundled with CDT(8.1.1) and so on.
Indeed, there's a workaround to this problem by simply adding a file entry
named mingw32-gcc.exe in MinGW bin directory (e.g., by issuing touch
c:\MinGW\bin\mingw32-gcc.exe)
I've tried to find some documentation of the CDT tool chain discovery
process, especially for this latest CDT 8.2-version, without any success.
So, my question is: Where to find such documentation - if any?
Or, can anybody explain?
Many thanks in advance!
Bundled in Kepler-version(4.3)
When using an alternative MinGW version like e.g.,
mingwbuilds-gcc/g++-4.8.1, the CDT(8.2) bundled in the latest
Kepler-version(4.3) is not able to discover it as a MinGW tool chain. This
behavior is introduced with this latest release.
The MinGW discovery process works fine on such an alternative MinGW in
previous releases like Juno-SR2 bundled with CDT(8.1.1) and so on.
Indeed, there's a workaround to this problem by simply adding a file entry
named mingw32-gcc.exe in MinGW bin directory (e.g., by issuing touch
c:\MinGW\bin\mingw32-gcc.exe)
I've tried to find some documentation of the CDT tool chain discovery
process, especially for this latest CDT 8.2-version, without any success.
So, my question is: Where to find such documentation - if any?
Or, can anybody explain?
Many thanks in advance!
How to alert inline of button
How to alert inline of button
I know already how to alert by use javascript or Jquery. But just onclick
button I apply javascript external or internal. What I need is we alert
inline of button
Example : <button name="my_btn" id="my_btn" onClick="alert('Hello I am
alert')">Alert</button>
If it is possible please tell me. I am waiting for all of you
Thank regard, Yuth
I know already how to alert by use javascript or Jquery. But just onclick
button I apply javascript external or internal. What I need is we alert
inline of button
Example : <button name="my_btn" id="my_btn" onClick="alert('Hello I am
alert')">Alert</button>
If it is possible please tell me. I am waiting for all of you
Thank regard, Yuth
Monday, 19 August 2013
SharedPreferences ListPreference NullPointerException
SharedPreferences ListPreference NullPointerException
I'm trying to set up a list of frequencies in my preferences xml but I
keep getting this error. I have attached all the related files too. I
believe that I set up the values correctly but I can't find where my error
currently is. Also, when I use the SharedPreferences.getString(key,
defaultValue) what value is returned? The ENTRY or the ENTRYVALUE?
My Error:
08-20 00:14:25.195: E/AndroidRuntime(1260): FATAL EXCEPTION: main
08-20 00:14:25.195: E/AndroidRuntime(1260): java.lang.NullPointerException
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.findIndexOfValue(ListPreference.java:215)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getValueIndex(ListPreference.java:224)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getEntry(ListPreference.java:202)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getSummary(ListPreference.java:148)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.Preference.onBindView(Preference.java:515)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.Preference.getView(Preference.java:453)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.java:222)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.AbsListView.obtainView(AbsListView.java:2461)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.makeAndAddView(ListView.java:1775)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.fillDown(ListView.java:678)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.fillFromTop(ListView.java:739)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.layoutChildren(ListView.java:1628)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.AbsListView.onLayout(AbsListView.java:2296)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.FrameLayout.onLayout(FrameLayout.java:448)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.FrameLayout.onLayout(FrameLayout.java:448)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1994)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1815)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1112)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4518)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer.doFrame(Choreographer.java:525)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Handler.handleCallback(Handler.java:615)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Handler.dispatchMessage(Handler.java:92)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Looper.loop(Looper.java:137)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.app.ActivityThread.main(ActivityThread.java:4898)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
java.lang.reflect.Method.invokeNative(Native Method)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
java.lang.reflect.Method.invoke(Method.java:511)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
dalvik.system.NativeStart.main(Native Method)
xml layout:
<ListPreference
android:key="frequency_key"
android:title="Sample Rate"
android:defaultValue="8000"
android:entries="@array/freq_titles"
android:entryValues="@array/freq_values"
/>
xml array:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="freq_titles">
<item name="8000">8k Hz</item>
<item name="16000">16k Hz</item>
<item name="22050">22.05k Hz</item>
<item name="44100">44.1k Hz</item>
<item name="48000">48k Hz</item>
</string-array>
<integer-array name="freq_values">
<item name="8000">8000</item>
<item name="1600">16000</item>
<item name="22050">22050</item>
<item name="44100">44100</item>
<item name="48000">48000</item>
</integer-array>
</resources>
I'm trying to set up a list of frequencies in my preferences xml but I
keep getting this error. I have attached all the related files too. I
believe that I set up the values correctly but I can't find where my error
currently is. Also, when I use the SharedPreferences.getString(key,
defaultValue) what value is returned? The ENTRY or the ENTRYVALUE?
My Error:
08-20 00:14:25.195: E/AndroidRuntime(1260): FATAL EXCEPTION: main
08-20 00:14:25.195: E/AndroidRuntime(1260): java.lang.NullPointerException
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.findIndexOfValue(ListPreference.java:215)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getValueIndex(ListPreference.java:224)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getEntry(ListPreference.java:202)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.ListPreference.getSummary(ListPreference.java:148)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.Preference.onBindView(Preference.java:515)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.Preference.getView(Preference.java:453)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.java:222)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.AbsListView.obtainView(AbsListView.java:2461)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.makeAndAddView(ListView.java:1775)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.fillDown(ListView.java:678)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.fillFromTop(ListView.java:739)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.ListView.layoutChildren(ListView.java:1628)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.AbsListView.onLayout(AbsListView.java:2296)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.FrameLayout.onLayout(FrameLayout.java:448)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.widget.FrameLayout.onLayout(FrameLayout.java:448)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.View.layout(View.java:14063)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewGroup.layout(ViewGroup.java:4603)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1994)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1815)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1112)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4518)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer.doFrame(Choreographer.java:525)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Handler.handleCallback(Handler.java:615)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Handler.dispatchMessage(Handler.java:92)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.os.Looper.loop(Looper.java:137)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
android.app.ActivityThread.main(ActivityThread.java:4898)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
java.lang.reflect.Method.invokeNative(Native Method)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
java.lang.reflect.Method.invoke(Method.java:511)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
08-20 00:14:25.195: E/AndroidRuntime(1260): at
dalvik.system.NativeStart.main(Native Method)
xml layout:
<ListPreference
android:key="frequency_key"
android:title="Sample Rate"
android:defaultValue="8000"
android:entries="@array/freq_titles"
android:entryValues="@array/freq_values"
/>
xml array:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="freq_titles">
<item name="8000">8k Hz</item>
<item name="16000">16k Hz</item>
<item name="22050">22.05k Hz</item>
<item name="44100">44.1k Hz</item>
<item name="48000">48k Hz</item>
</string-array>
<integer-array name="freq_values">
<item name="8000">8000</item>
<item name="1600">16000</item>
<item name="22050">22050</item>
<item name="44100">44100</item>
<item name="48000">48000</item>
</integer-array>
</resources>
Subscribe to:
Posts (Atom)