A process of keeping a particular fragment from entity while replacing the rest of it.
Questions tagged [preserve]
136 questions
171
votes
7 answers
best way to preserve numpy arrays on disk
I am looking for a fast way to preserve large numpy arrays. I want to save them to the disk in a binary format, then read them back into memory relatively fastly. cPickle is not fast enough, unfortunately.
I found numpy.savez and numpy.load. But…

CuriousMind
- 15,168
- 20
- 82
- 120
29
votes
4 answers
Sort a multidimensional array descending by subarray count and preserve first level keys
I have an array such as:
$array = [
'DEF' => [
['type' => 1, 'id' => 1212, 'name' => 'Jane Doe', 'current' => 1],
['type' => 1, 'id' => 3123121, 'name' => 'Door', 'current' => null],
],
'ABC' => [
['type' => 1,…

Aviram
- 3,017
- 4
- 29
- 43
22
votes
11 answers
ReDim Preserve to a multi-dimensional array in VB6
I'm using VB6 and I need to do a ReDim Preserve to a Multi-Dimensional Array:
Dim n, m As Integer
n = 1
m = 0
Dim arrCity() As String
ReDim arrCity(n, m)
n = n + 1
m = m + 1
ReDim Preserve arrCity(n, m)
Whenever I…

Ouerghi Yassine
- 1,835
- 7
- 43
- 72
20
votes
3 answers
How does angular application handle refresh page and could we use $history on loading directives
So two questions.
How does angular applications handle refresh page, b/c from what I heard, $rootScope destroy() on refresh and application gets re-run and re-config -ed, and I was wondering if there's an elegant way to preserve the $rootScope…

user2167582
- 5,986
- 13
- 64
- 121
16
votes
5 answers
How to keep a config file when major upgrade in wix v3.8?
I want to keep a config file when the msi installer does a major upgrade. For the config file, I make a change when installing. The code is as follows:

zhoulin Wang
- 559
- 2
- 5
- 19
15
votes
3 answers
How do I rename a table in Oracle so that all foreign keys, constraints, triggers and sequences are updated and any existing data is preserved?
I need to rename a table in Oracle but I want to be sure that any foreign keys, constraints, triggers and sequences that reference the table are updated to use the new name.
How can I be sure that I have not broken anything?
Note that I want to…

Warren Blumenow
- 673
- 2
- 11
- 17
12
votes
3 answers
array_splice preserving keys
I faced the situation that splicing arrays with preserved-keys, so I made the following function.
I reached the solution that wrapping each items with array, but there seems to be some memory-inefficient statements.
Have you any ideas?
Thank…

mpyw
- 5,526
- 4
- 30
- 36
12
votes
4 answers
How to preserve matlab struct when accessing in python?
I have a mat-file that I accessed using
from scipy import io
mat = io.loadmat('example.mat')
From matlab, example.mat contains the following struct
>> load example.mat
>> data1
data1 =
LAT: [53x1 double]
LON:…

mikeP
- 801
- 2
- 11
- 20
11
votes
1 answer
How to preserve file permissions with cmake "install directory" directive?
Prolog: I'm an idiot for missing this in the documentation
cmake-2.8.10.2
How do you make cmake preserve the original file permissions when installing a directory? For the project at hand, I'd like it to essentially copy some directories from my…

smcdow
- 699
- 1
- 7
- 12
11
votes
4 answers
telling uglify to keep certain comments (using CodeKit)
I'm using CodeKit to develop a WordPress theme. Of course I'd like to compress the LESS when it's compiled into CSS, but uglify.js removes all comments.
Does anyone know how to mark specific comments for preservation?
Edit: just wanted to add that…

rgb_life
- 353
- 3
- 10
7
votes
3 answers
Replace content in elements without replacing HTML
Suppose I have the following HTML structure:
Now I use the following jQuery…
This is a test
This is another test

TVA van Hesteren
- 1,031
- 3
- 20
- 47
7
votes
1 answer
Java ProGuard. Class keep (do not delete) but yet allow to be obfuscated
I want to skip a particular class from deletion. It isn't normally referenced anywhere in my application, but only by reflection, therefore it does get removed by the shrinker. It is referenced by other "adjacent" classes in its package, but yet,…

PatlaDJ
- 1,226
- 2
- 17
- 31
5
votes
1 answer
Append Value to Rickshaw Graph Axis and what is ticksTreatment and Preserve
This is my first question on here so please go easy :)
I am trying to implement some line graphs with rickshaw graphs, d3 and jquery UI.
I have some vertical tabs and have successfully gotten the charts to load from external html files.
There was a…

designscoop
- 69
- 7
4
votes
2 answers
Are Ruby arrays loaded from YAML files guaranteed to have their order preserved?
I've been told that depending on the YAML library used, when a list (not hash!) in a YAML file is translated into a Ruby array, the order is not guaranteed. However, I've not been able to find any evidence of this. So given a YAML file…

Suan
- 34,563
- 13
- 47
- 61
4
votes
2 answers
Why SQLite database cleared on clearing data of application from Application Management?
I created a simple database application using SQLite which first creates database and then allow users to insert and view inserted records. But when I clear data from Application Settings of android phone, the data of the database is also cleared.…

Khawar Raza
- 15,870
- 24
- 70
- 127