问题解答DPST1091 CSpotify

DPST1091 21T1 - Assignment 2 - CSpotify
Assignment 2 - CSpotify
Introduction
We consider music streaming to be a normal thing that we use regularly . . . but it wasn't always this way. In the late 1990s, a new file format
called the MP3 appeared. Its ability to compress audio coupled with the rise of the internet lead to a new era in the music industry. Napster
(and a new generation of music pirates) brought this into the spotlight when they launched in 1999.
Nowadays, with services like Spotify, we have access to a massive library of music (and other audio) content from nearly any device with an
internet connection.
In this assignment, you'll be looking at some of the coding work that goes into organisation of music with things like song information,
playlists and personal music libraries. CSpotify is our implementation of a song library using linked lists as the primary data structure.
Your Goal
The assignment is divided into two parts:
Part A - Implementation (5 Stages)
Your task here is to write the functions that will manage your music Library of Playlists which contain Tracks. All of these functions
are contained inside the file cspotify.c.
Part B - Testing
Your task here is to write functions in test_cspotify.c to check that your code works.
Please note that you do not need to scan in any inputs from the user, this is already completed for you in the given starter code.
The Overall Picture - Your Library
The Library is the overall struct which contains all the objects you will need for the assignment. The Library contains a list of Playlists. In
each of the Playlists, there is a list of Tracks. At the start of the program, the Library starts off as an empty Library containing no
Playlists and hence no Tracks.
As you progress through Stage 1 of the assignment to manage Playlists to your Library, your Library might start to look like this, where
there are Playlists in the Library but not Tracks in any of the Playlists:
Note: You should refer to cspotify.h for more technical and detailed instructions in regards to each function’s implementation.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 2/13
Stage 2 will then allow you to navigate around your Library Playlists and add Tracks to each Library, resulting in a Library that could look
like this:
Each Track will store information about the title, artist and the trackLength in addition to a next pointer.
Stage 3 will focus on removing certain objects from your Library.
Stage 4 and 5 will be more challenging manipulations of your Library.
The assignment breaks up the above further into smaller tasks to help you build and navigate around your Library. It is strongly
recommended that o begin from Stage 1 and progress in the gi en order
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 3/13
recommended that you begin from Stage 1 and progress in the given order.
Getting Started
Starter Code
The starter code consists of the following files:
main.c contains the main function for the assignment. It will scan the program's input, then call the functions you will write.
You must not change this file.
cspotify.h contains the definitions of all the functions you will be writing. It also contains useful constants and type definitions.
You must not change this file.
cspotify.c contains empty functions which you will need to implement. It already contains some functions. It is strongly recommended that
you use these.
This file is where you will write your own code.
test_main.c contains a main function and other functions that allow you to run the tests you create in test_cspotify.c.
You must not change this file.
test_cspotify.h contains the prototypes of the testing functions in test_cspotify.c.
You must not change this file.
test_cspotify.c contains an alternative main function as well as template code that you will modify to make your own tests.
This file is where you will write your own test cases.
capture.h contains the definition of a function that allows you to capture the output of your own code, to use in testing. It can only be used
in test_cspotify.c, and will not be available in cspotify.c .
You must not change this file.
capture.c contains the implementation of functions that allow you to capture the output of your own code, to use in testing.
You must not change this file.
To run your code interactively, you should use the command:
$ dcc -o cspotify cspotify.c main.c
$ ./cspotify
To run your tests (written in test_cspotify.c), you should use the command:
$ dcc -o test_cspotify cspotify.c test_cspotify.c capture.c test_main.c
$ ./test_cspotify
Allowed C Features
In this assignment, there are two restrictions on C Features:
You must follow the rules explained in the Style Guide.
You may not use the function fnmatch, or import fnmatch.h.
It is recommended to only use features that have been taught in DP1091. Course work in Week 8, 9 and some of Week 10 will have a
particular focus on assistance for this assignment and you will not need any of the subject material from Weeks 11 or 12.
If you choose to disregard this advice, you must still follow the Style Guide. You also may be unable to get help from course staff if you use
features not taught in DP1091.
Reference Implementation
If you have questions about what behaviour your program should exhibit, we have provided a sample solution for you to use.
$ 1091 cspotify
Download the starter code (cspotify.zip) here or copy it to your CSE account using the following command:
$ 1091 setup_cspotify
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 4/13
Stage One
When you execute your program, you can assume that the Library has already been created for you to perform the following operations.
Stage 1 involves managing the Playlists in your Library as well as printing out the state of the Library. You will need to implement or
modify the following functions:
create_library (This is already implemented for you, you may need to modify it)
add_playlist
print_library
rename_playlist
Add a playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Add a new Playlist to the Library.
int add_playlist(Library library, char playlistName[MAX_LEN]) {
return SUCCESS;
}
This function will be given a Library and a Playlist name. You will need to insert a new Playlist node at the end of the linked list of
Playlists in the Library. If the Library has no Playlists, your new Playlist will become the first Playlist in the Library. If this is the case,
you will need to make this Playlist “selected”.
You can assume you will never receive a Playlist name which already exists in the Library
You may receive invalid inputs so the function will return either:
ERROR_INVALID_INPUTS if the given Playlist name is invalid (i.e. not alphanumeric).
SUCCESS if a new Playlist is successfully added.
You will need to create a Playlist node (using malloc) before it is inserted into the Library.
Please note that until you implement the next function in this stage for printing out the Library, you will not be able to see whether your
Playlist has been added successfully into the Library.
Print Out the Library
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Print out the Library.
void print_library(Library library) {
}
You will need to use the following helper functions already provided to you in the same file: print_playlist, print_selected_playlist and
print_track.
This function will be given a Library. The function should go through each Playlist in the Library and print out the information in the order
they are in inside the Library. You should use the above helper functions to print the Library out, instead of calling printf yourself. Note
that the word static on these functions will make that function only accessible in the current file. We often use static on helper functions
that are not part of the header file and aren't used by any other parts of the program. static will not significantly change how you will use or
define this function.
Command: A
Example: A RoadTrip
Description: Adds a new Playlist named "Roadtrip" at the end of the Library of Playlists.
The message which appears right after running any command simply acknowledges the function has been called and/or depends on
your return values. It does not necessarily indicate the success of your implementation of this function.
Command: P
Example: P
Description: Prints out the Library.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 5/13
You may see that both print_playlist and print_selected_playlist above take in an int number, this is the position in which they are in in
the Library of Playlists assuming that the first Playlist is at position 0.
The function should not return anything.
At this stage, you will only need to use print_playlist and print_selected_playlist to help you print out information in the Library.
print_track is not needed until Stage 2 has been implemented. After implementing stage 2, you should come back and make sure that the
Tracks in each Playlist are also printed out.
Rename a Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Rename the name of an existing Playlist.
int rename_playlist(Library library, char playlistName[MAX_LEN],
char newPlaylistName[MAX_LEN]) {
return SUCCESS;
}
This function will be given a Library, a Playlist name and a new Playlist name. Your task is to find the playlistName in the Library of
Playlists and change its name to the name given in newPlaylistName.
You may receive invalid inputs so the function will return either:
ERROR_NOT_FOUND if the given Playlist name is not found otherwise,
ERROR_INVALID_INPUTS if the new Playlist name is invalid (i.e. not alphanumeric).
SUCCESS if a new Playlist is successfully added.
Stage Two
Stage 2 involves navigating around a Library of Playlists and adding Tracks. You will need to implement the following functions:
select_next_playlist
select_previous_playlist
add_track
playlist_length
Select the Next Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Selects the next Playlist in the Library.
void select_next_playlist(Library library) {

}
This function will be given a Library. In Stage 1, by default the first Playlist added into the Library was selected. For this function, you will
need to change the selected Playlist in the Library to the Playlist after the currently selected Playlist.
If the currently selected Playlist is the last Playlist in the Library, make the first Playlist in the Library become the new selected
Playlist.
The function should not return anything.
Select the Previous Playlist
Command: R
Example: R Roadtrip SleepMusic
Description: Renames the existing Playlist "Roadtrip" to "SleepMusic".
Command: S
Example: S
Description: Selects the next Playlist in the Library.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 6/13
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Selects the previous Playlist in the Library.
void select_previous_playlist(Library library) {

}
This function is very similar to selecting the next Playlist. Given a Library, you will need to change the Playlist that is selected to the
Playlist before the currently selected Playlist.
If the currently selected Playlist is the first Playlist in the Library, make the last Playlist in the Library become the new selected
Playlist.
The function should not return anything.
Add a Track
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Add a new Track to the selected Playlist.
int add_track(Library library, char title[MAX_LEN], char artist[MAX_LEN],
int trackLengthInSec, int position) {
return SUCCESS;
}
This function will be given a Library, Track title, the artist of the Track, the Track length in seconds as well as a position number.
Your task is to go through the selected Playlist and add a new Track node at the position specified by position. If position is 0, the node
should be inserted at the front of the Playlist. If the position has a value equal to the number of Tracks in the Playlist, the node should
be inserted at the end of the Playlist.
It is possible that the same Track can be added to the same Playlist multiple times. You may receive invalid inputs so the function will
return one of the following:
ERROR_NOT_FOUND if there are no Playlists in the Library, otherwise,
ERROR_INVALID_INPUTS if the given title/artist/position/track length is invalid. (see cspotify.h for more details)
SUCCESS if a new Playlist is successfully added.
You will also need to make changes to your print_library function in Stage 1 so that it will now also print out the Tracks you add to a
Playlist.
Calculate the Length of the Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Calculate the total length of the selected Playlist in minutes and seconds.
void playlist_length(Library library, int playlistMinutes, int playlistSeconds) {
}
For this function, you are given a Library and two uninitialised int variables passed into the function by reference (i.e. the two int pointers
you receive in this function are pointing to the memory location of two int variables).
Command: W
Example: W
Description: Selects the previous Playlist in the Library.
Command: a <artist> <trackLengthInSec> <position><br>Example: a PrettySavage BLACKPINK 350 0<br>Description: Adds a new Track at the 0th position in the selected Playlist. Specifically, this is a Track titled "PrettySavage" by the<br>artist "BLACKPINK" and has a Track length of 350 seconds.<br>Command: T<br>Example: T<br>Description: Calculates the total length of the selected Playlist in minutes and seconds. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=c7eKBGLDD6tEdOxWMMKVFg%3D%3D.11%2B6pi7OQOfUCnWr%2BDzEt3dEhBzVBReL8fY6wBb03Leu8oBnoglJ7kr8Vu2tGOpojl8p7OHqAwwSpgNXFOVwOzhjMxFSR50E5Znv0ZAVg08%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 7/13<br>Your task is to go through and calculate the length of the currently selected Playlist in your Library. The total number of minutes in the<br>Playlist should be stored inside the memory pointed to by the playlistMinutes pointer. The total number of seconds in the Playlist<br>should be stored in the memory pointed to by the playlistSeconds pointer.<br>The function should not return anything.<br>Stage Three<br>Stage 3 involves removing objects from your Library and the Library itself. You will be freeing memory which has been malloced. You will<br>need to implement the following functions:<br>delete_track<br>delete_playlist<br>delete_library<br>Delete a Given Track<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Delete the first instance of the given track in the selected Playlist<br>// of the Library.<br>void delete_track(Library library, char track[MAX_LEN]) {<br>}<br>Calling this function should delete the first instance which matches the given Track name within the selected Playlist.<br>The function should not return anything.<br>Delete the Selected Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Delete the selected Playlist and select the next Playlist in the Library.<br>void delete_playlist(Library library) {<br>}<br>Calling this function should delete the entire selected Playlist as well as all the Tracks within this Playlist. You should ensure that the next<br>Playlist in the Library is selected once the currently selected Playlist is removed. If there is no next Playlist, select the first Playlist in<br>the Library.<br>The function should not return anything.<br>Delete the Entire Library<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>Command: d <track><br>Example: d LovesickGirls<br>Description: Deletes the first instance of the Track titled "LovesickGirls" in the selected Playlist of the Library.<br>Command: D<br>Example: D<br>Description: Deletes the selected Playlist and select the next Playlist in the Library.<br>Command: X<br>Example: X<br>Description: Deletes an entire Library and its associated Playlists and Tracks. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=vEN8SCpPNi8p8JwSn1FTmQ%3D%3D.9wYq6BURpY6kSjv7KVwX%2B%2F36o1KCagfIQHO4EpPZuM13ri48vWcJ3568ePz%2FHK%2Fp2Bx7dc9t4Tn5Gi26IVZadIstkZqJBtmU0LO%2FdygYYBM%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 8/13<br>// Delete an entire Library and its associated Playlists and Tracks.<br>void delete_library(Library library) {<br>}<br>Calling this function should delete the entire given Library including its Playlists and Tracks within each Playlist.<br>The function should not return anything.<br>Stage Four<br>Stage 4 consists of more involved manipulations of the Library. You will need to implement the following functions:<br>cut_and_paste_track<br>soundex_search<br>Cut and Paste Track<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Cut the given track in selected Playlist and paste it into the given<br>// destination Playlist.<br>int cut_and_paste_track(Library library, char trackTitle[MAX_LEN],<br> char destPlaylist[MAX_LEN]) {<br> return SUCCESS;<br>}<br>This function will take in a Library, a Track title and a destination Playlist. It should remove the first Track instance which matches the given<br>trackName from the selected Playlist and add it into the end of the Playlist with the given destination Playlist name. The function<br>should return one of the error codes (see cspotify.h for more details) or SUCCESS.<br>Soundex Search<br>What is Soundex?<br>Soundex is a phonetic algorithm which allows strings to be encoded so that words which sound similar will have the same encoding despite<br>small differences in spelling.<br>This becomes very useful in searching for music. For example, when searching for artists, mispelling the artist names will still allow you to<br>search for the artist.<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Search the given Library for tracks where its artist<br>// match the given searchTerm<br>void soundex_search(Library library, char artist[MAX_LEN]) {</p> <p>}<br>This function will take in a Library and a search term. Your task is to go through the given Library and print out all Tracks with artists that<br>have the same Soundex encoding as the given search term. You will again, need to use the given help function print_track instead of calling<br>printf yourself to print out the matching Tracks.<br>This stage has very few tests in the autotest! They do not necessarily cover every edge case. You should test it with other inputs, and<br>compare your solution against the reference solution.<br>Command: c <trackName> <destPlaylist><br>Example: c WakaWaka Fun<br>Description: Moves the Track title "WakaWaka" from the currently selected Playlist to an existing destination Playlist named "Fun".<br>Command: s <searchTerm><br>Example: s Robert<br>Description: Prints out all Tracks with artists that have the same Soundex Encoding as the given search term. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=G6GNEZg9FVj3WiBcqb%2FPiA%3D%3D.0WstajiVjP01BrE5%2BeZelk21KR1YH1PRCzgpqIQAySDabHCbfM35KDZdvYiYkzxioD5y24bnzaXVCZyrJZHOQZk6o8%2F8YbhXkT83HWqQ3RA%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 9/13<br>The specific version of the Soundex algorithm which will be used is specified in cspotify.h<br>The function should not return anything.<br>Stage Five<br>Stage 5 consists of more involved manipulations of the Library. You will need to implement the following functions:<br>add_filtered_playlist<br>reorder_playlist<br>Add Filtered Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Move all Tracks with artists that have the same Soundex Encoding as<br>// the given artist to a new Playlist.<br>int add_filtered_playlist(Library library, char artist[MAX_LEN]) {<br> return SUCCESS;<br>}<br>This function will take in a Library and an artist. It should go through the entire Library and move all Tracks with artists that have the same<br>Soundex Encoding as the given artist into a new Playlist named with the given artist. The function should return one of the error codes (see<br>cspotify.h for more details) or SUCCESS.<br>Reorder Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Move all Tracks with artists that have the same Soundex Encoding as<br>// the given artist to a new Playlist.<br>// Reorder the selected Playlist in the given order specified by the order array.<br>void reorder_playlist(Library library, int order[MAX_LEN], int length) {<br>}<br>This function differs slightly in the way in which the command is executed. Once the above command is executed, the program will prompt<br>you to enter a series of integers.<br>This function will take in a Library, an order array and length. It should reorder the Tracks in the selected Playlist based on the order in the<br>given array. More details about this function has been given in cspotify.h.<br>Testing<br>It is important to test your program thoroughly to make sure it can manage different situations.<br>Writing your own Automated Tests<br>As you implement functions in cspotify.c, you will encounter autotests in that require you to implement the functions in test cspotify.c.<br>This stage has very few tests in the autotest! They do not necessarily cover every edge case. You should test it with other inputs, and<br>compare your solution against the reference solution.<br>Command: F <artist><br>Example: F Taylor<br>Description: Move all Tracks with artists that have the same Soundex Encoding as "Taylor" to a new Playlist.<br>Command: r <length><br>Example: r 5<br>Description: Reorders the selected Playlist of 5 Tracks in an order which will be specified in the input following this command. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=znfxs5nd8GiaPkKj8nWZ2A%3D%3D.nnJj04RAf5wZe4xEMijUz6X6V%2B6KAO3KLxq0GN7RWu1lkl8Y9qzyaoXs8Xee6yzMeZv9uz4DSkwW23OGpKDFEwOGPB1YBK2DsVfB1doC4DM%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 10/13<br>s you p e e t u ct o s cspot y.c, you e cou te autotests t at equ e you to p e e t t e u ct o s test_cspot y.c.<br>You are given a file test_main.c. This is not the same as the interactive program in main.c. Instead, it runs the series of automatic tests on the<br>functionality provided by cspotify.h and cspotify.c. You should not change this main function.<br>Your main function will call other functions that look like this:<br>// Test function for 'add_playlist'<br>int test_add_playlist(void) {<br> // Test 1: Does add_playlist return SUCCESS and add<br> // when adding one Playlist with a valid name?<br> Library testLibrary = create_library();<br> int result = add_playlist(testLibrary, "Favourites");<br> if (result != SUCCESS) {<br> printf("DOES NOT MEET SPEC\n");<br> return;<br> }<br> char printText[10000];<br> CAPTURE(print_library(testLibrary), printText, 10000);<br> if (!string_contains(printText, "Favourites")) {<br> printf("DOES NOT MEET SPEC\n");<br> return;<br> }<br> // Test 2: Does add_playlist return ERROR_INVALID_INPUTS<br> // and not add the playlist into the Library<br> // when trying to add a Playlist with an invalid name?<br> // TODO: Add your test for Test 2<br> // Test 3: ???<br> // TODO: Add your own test, and explain it.<br> printf("MEETS SPEC\n");<br>}<br>Your job is to fill in the spaces where it says "TODO" with a series of C statements that check whether the functions in cspotify.c work.<br>As you can see in Test 1, some of these functions have already been partially implemented to show you what you should do<br>Some functions will ask you to specifically test something (in this case, to make sure add_playlist returns the correct amount if you call it<br>many times).<br>Some functions will ask you to decide on your own test. You should describe what you are testing, and then write a test for that situation.<br>Note that you can only test functions by checking their outputs, and their output to the terminal. You cannot access the fields of a struct, nor<br>can you redefine the structs from cspotify.c in test_cspotify.c. Doing so may cause you to lose marks.<br>You can test your tests yourself, by compiling it against your cspotify.c.<br>This is what you will see when you compile the starter code/tests.<br>$ dcc -o test_cspotify test_cspotify.c cspotify.c capture.c<br>$ ./test_cspotify<br><em><del>~</del><del>~</del><del>~</del><del>~</del><del>~{ CSpotify Tests }</del><del>~</del><del>~</del><del>~</del><del>~</del>~</em><br>Stage 1 - Test add_playlist: DOES NOT MEET SPEC<br>Stage 1 - Test rename_playlist: DOES NOT MEET SPEC<br>Stage 2 - Test add_track: MEETS SPEC<br>Stage 2 - Test playlist_length: MEETS SPEC<br>Stage 3 - Test delete_playlist: MEETS SPEC<br>Stage 4 - Test soundex_search: MEETS SPEC<br>Your extra tests: MEETS SPEC<br>Capture<br>You may notice that we have given you two extra files -- capture.c and capture.h. These files define the CAPTURE macro. Macros are not<br>covered in this course and as a result, you do not need to understand these files.<br>You can use them to capture what a function prints and put it into a string. This is useful if you use it with for example, the print_library<br>function, since you can then test the output for the Library is as you expect.<br>The header of capture.h describes how to use it.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=mEl%2B6aW1%2BeD9PFQP5SAKEA%3D%3D.a99kHkN%2BrWIiq9xjfmK5oViJ2H7kJqbsDUq9uABiG3rY0eQp3Uhf2VHwh2l3TEt5zqywpFTN8UwRI34roC5fnuXK5N5UhduUs6OMu95mutY%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 11/13<br>// This file contains the <code>CAPTURE()</code> macro. To use this macro,<br>// you should define a large, empty string. Lets say your string is:<br>// char str[MAX_LENGTH];<br>// Then you can do the following:<br>// CAPTURE(my_function(), str, MAX_LENGTH)<br>// Which will put the output of <code>my_function()</code> into str.<br>Autotests<br>As usual autotest is available with some simple tests - but your own tests in test_cspotify.c may be more useful at pinpointing exactly<br>which functions are and aren't working.<br>$ 1091 autotest cspotify<br>If you wish to use autotest to view only a specific stage of the assignment, you can use autotest-stage. The following example shows how to<br>autotest stage 1 but you can replace the stage number with any stage you would like to test.<br>$ 1091 autotest-stage 01 cspotify<br>Frequently Asked Questions<br>How many tests do I need to complete to get full marks?<br>You only need to complete the tests marked with "TODO"; except the extra_tests which are optional. For each function, this means you will<br>need to write two tests (note that this desn't include tests we have provided you). You do not need to write tests for stage five, though we<br>encourage you to do so for your own learning and enjoyment!<br>Why can't I access structs from cspotify.c inside of test_cspotify.c?<br>The way C works is if the struct definition is not present in the current .c file then the code there is not able to access the members of that<br>struct. You can create a pointer variable which points to that struct, but you will not be able to access it's members with ->. This is a good<br>thing, and is intended.<br>This design feature is because it allows us to implement Abstract Data-Types (ADTs). The objective of using ADTs is so that the code of one<br>file can not access the “inner workings” of a variable that it uses, but is restricted to calling functions from a .h file with that variable. This may<br>sound counter productive at first, why would you want to limit access to a variable? Actually there are several advantages:</p> <ol> <li>Access Control: This is a useful concept when you have multiple programmers working together. It allows you to police the things that<br>happens to your Library. If you are the creator of the data type (the Library) you can prevent other people (who may not know what<br>their doing) from changing pointers (perhaps accidentally) in your data structure and in general ruining things.</li> <li>Abstraction: It presents a simple interface (defined in the .h file) to use the code of your Library. If you are the user of the data type<br>someone else has created, it is really helpful to be presented with a simpler interface which hides the details of the underlying data<br>structures, so they don't have to learn as many things to be able to use your data type.</li> <li>Decoupling: All test_cspotify.c files will conform to a common interface. Perhaps the way the other students in this course organised<br>the members in their structs might be different to the way you're doing it. Tests which don't directly interact with the Library's<br>members are interchangeable in this sense, one student's tests could be paired up with another student's Library and there wouldn't<br>be any compatibility issues there.<br>So, to fix your error, try to design tests which don't stab -> into the Library, just call the functions in cspotify.h and check their outputs are<br>correct/they did the correct things.<br>(Answer adapted from a forum post by Dean Wunder)<br>Can I define structs from cspotify.c in test_cspotify.c?<br>Unfortunately no, See above.<br>Why do I keep getting the Incomplete definition of type ... error?<br>Please Note: There will be tests in the autotest which are dedicated to testing some of the tests you write in test_cspotify.c. These<br>have not been released yet and will be released shortly after the assignment release.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=XcS9YwryHx0avZryTE1%2FTg%3D%3D.Oo8PDxzOakS46mBYxGgqovTC5nctaIeOIZlK53TC9AYerOG5W5NUD1gfpy1DxyUKes8CbgocGRE1dMN0Pc%2FoF4S7yoR7nsp%2FLgkDMcbyR%2Bg%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 12/13<br>See above.<br>Look out for this space! More may be added to clarify any questions throughout the assignment!<br>Assessment<br>Attribution of Work<br>This is an individual assignment. The work you submit must be your own work and only your work apart from exceptions below. Joint work is<br>not permitted.<br>You may use small amounts (< 10 lines) of general purpose code (not specific to the assignment) obtained from site such as Stack Overflow<br>or other publically available resources. You should attribute clearly the source of this code in a comment with it.<br>You are not permitted to request help with the assignment apart from in the course forum, help sessions or from course lecturers or tutors.<br>Do not provide or show your assignment work to any other person (including by posting it on the forum) apart from the teaching staff of<br>DPST1091.<br>The work you submit must otherwise be entirely your own work. Submission of work partially or completely derived from any other person<br>or jointly written with any other person is not permitted. The penalties for such an offence may include negative marks, automatic failure of<br>the course and possibly other academic discipline. Assignment submissions will be examined both automatically and manually for such<br>submissions.<br>Relevant scholarship authorities will be informed if students holding scholarships are involved in an incident of plagiarism or other<br>misconduct. If you knowingly provide or show your assignment work to another person for any reason, and work derived from it is submitted<br>you may be penalized, even if the work was submitted without your knowledge or consent. This may apply even if your work is submitted by<br>a third party unknown to you.<br>Note, you will not be penalised if your work is taken without your consent or knowledge.<br>Submission of Work<br>You are required to test and/or submit intermediate versions of your assignment. Every time you work on the assignment and make<br>some progress you should copy your work to your CSE account and submit it using the give command, or autotest it using 1091 autotest<br>It is fine if intermediate versions do not compile or otherwise fail submission tests.<br>Only the final submitted version of your assignment will be marked. You must give when you have completed your assignment.<br>If you would like to retrieve your old work, you can go to: View Autotests/Submissions/Marking and click the yellow bubble next to<br>ass2_cspotify. This will show you a timeline of all the code you have submitted recently.<br>You submit your work like this:<br>$ give dp1091 ass2_cspotify cspotify.c test_cspotify.c<br>The only files you can modify are cspotify.c and test_cspotify.c. It is not possible to add new files, or modify the other files we have<br>given you. If you believe you need to modify those files, you have misunderstood the specification. You should not modify your copies of<br>those files in any way.<br>Assessment Scheme<br>This assignment will contribute 15% to your final mark.<br>70% of the marks for this assignment will be based on the performance of the functions you write in cspotify.c.<br>10% of the marks for this assignment will come from the test_cspotify.c file. We will examine your own test cases to assess how many<br>distinct cases they test, and whether they meet the descriptions in test_cspotify.h.<br>20% of the marks for assignment 2 will come from hand marking of the readability of the C you have written. These marks will be awarded<br>on the basis of clarity, commenting, elegance and style. In other words, your tutor will assess how easy it is for a human to read and<br>understand your program.<br>Here is an indicative marking scheme.</li> <li>Completely working implementation of Stages 1-5; with beautiful code and a test_cspotify.c with useful tests filling in<br>the TODO comments.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=KnF1rcH6E0dnCuE7hIeazA%3D%3D.DB2OqeN6Va6a6as23SkZpEBaAVy6mCgc8HMCsDczCkKpXGzrDPO9jDmfdLncUo6aMSusjUhQoW6gi02OLLYeDpnlE%2F04KNf7DgipQ6NhTNw%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 13/13<br>DPST1091 21T1: Programming Fundamentals is brought to you by<br>the School of Computer Science and Engineering<br>at the University of New South Wales, Sydney.<br>For all enquiries, please email the class account at <a href="mailto:dp1091@cse.unsw.edu.au">dp1091@cse.unsw.edu.au</a><br>CRICOS Provider 00098G</li> <li>Completely working implementation of Stages 1-4; with very readable code and a test_cspotify.c with useful tests<br>filling in the TODO comments.</li> <li>Completely working implementation of Stages 1-3; with readable code and a test suite covering up to stage 3 in<br>test_cspotify.c.</li> <li>Completely working implementation of Stages 1 and 2; with understandable code and a test suite that covers stage 1-2<br>functions in test_cspotify.c.</li> <li>Completely working implementation of Stage 1; with an attempt at readable code, and some tests added to<br>test_cspotify.c.<br>40-50 Partially working implementation of Stage 1.<br>0% Knowingly providing your work to anyone and it is subsequently submitted (by anyone).<br>0% Submitting any other person's work. This includes joint work.</li> <li>FL for<br>DPST1091<br>Paying another person to complete work. Submitting another person's work without their consent.<br>The lecturer may vary the assessment scheme after inspecting the assignment submissions but it will remain broadly similar to the<br>description above.<br>Due Date<br>This assignment is due Friday 9 April 2021 20:00:00<br>If your assignment is submitted after this date, each hour it is late reduces the maximum mark it can achieve by 2%. For example if an<br>assignment worth 78% was submitted 5 hours late, the late submission would have no effect. If the same assignment was submitted 15<br>hours late it would be awarded 70%, the maximum mark it can achieve at that time.<br>Change Log<br>Credits<br>Created by Tom Kunc and Marc Chee and with contributions from Liz Willer, Dean Wunder, and Tammy Zhong<br>Version 1.0<br>(2020-10-10 10:00:00)<br>Assignment released.</li> </ol> </article> </div> </div> </div> <!--PC和WAP自适应版--> <div id="SOHUCS" sid="1511289750256943104"></div> <script type="text/javascript" src="/views/front/js/chanyan.js"></script> <!-- 文章页-底部 动态广告位 --> <div class="youdao-fixed-ad" id="detail_ad_bottom"></div> </div> <div class="col-md-3"> <div class="row" id="ad"> <!-- 文章页-右侧1 动态广告位 --> <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_1"> </div> </div> <!-- 文章页-右侧2 动态广告位 --> <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_2"></div> </div> <!-- 文章页-右侧3 动态广告位 --> <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_3"></div> </div> </div> </div> </div> </div> </div> <div class="container"> <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(前端)</h4> <div id="paradigm-article-related"> <div class="recommend-post mb30"> <ul class="widget-links"> <li><a href="/article/1835509897106649088.htm" title="Long类型前后端数据不一致" target="_blank">Long类型前后端数据不一致</a> <span class="text-muted">igotyback</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>响应给前端的数据浏览器控制台中response中看到的Long类型的数据是正常的到前端数据不一致前后端数据类型不匹配是一个常见问题,尤其是当后端使用Java的Long类型(64位)与前端JavaScript的Number类型(最大安全整数为2^53-1,即16位)进行数据交互时,很容易出现精度丢失的问题。这是因为JavaScript中的Number类型无法安全地表示超过16位的整数。为了解决这个问</div> </li> <li><a href="/article/1835498925755297792.htm" title="DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理" target="_blank">DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理</a> <span class="text-muted">STU学生网页设计</span> <a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/%E6%9C%9F%E6%9C%AB%E7%BD%91%E9%A1%B5%E4%BD%9C%E4%B8%9A/1.htm">期末网页作业</a><a class="tag" taget="_blank" href="/search/html%E9%9D%99%E6%80%81%E7%BD%91%E9%A1%B5/1.htm">html静态网页</a><a class="tag" taget="_blank" href="/search/html5%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">html5期末大作业</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/web%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web大作业</a> <div>️精彩专栏推荐作者主页:【进入主页—获取更多源码】web前端期末大作业:【HTML5网页期末作业(1000套)】程序员有趣的告白方式:【HTML七夕情人节表白网页制作(110套)】文章目录二、网站介绍三、网站效果▶️1.视频演示2.图片演示四、网站代码HTML结构代码CSS样式代码五、更多源码二、网站介绍网站布局方面:计划采用目前主流的、能兼容各大主流浏览器、显示效果稳定的浮动网页布局结构。网站程</div> </li> <li><a href="/article/1835497792265613312.htm" title="【加密社】Solidity 中的事件机制及其应用" target="_blank">【加密社】Solidity 中的事件机制及其应用</a> <span class="text-muted">加密社</span> <a class="tag" taget="_blank" href="/search/%E9%97%B2%E4%BE%83/1.htm">闲侃</a><a class="tag" taget="_blank" href="/search/%E5%8C%BA%E5%9D%97%E9%93%BE/1.htm">区块链</a><a class="tag" taget="_blank" href="/search/%E6%99%BA%E8%83%BD%E5%90%88%E7%BA%A6/1.htm">智能合约</a><a class="tag" taget="_blank" href="/search/%E5%8C%BA%E5%9D%97%E9%93%BE/1.htm">区块链</a> <div>加密社引言在Solidity合约开发过程中,事件(Events)是一种非常重要的机制。它们不仅能够让开发者记录智能合约的重要状态变更,还能够让外部系统(如前端应用)监听这些状态的变化。本文将详细介绍Solidity中的事件机制以及如何利用不同的手段来触发、监听和获取这些事件。事件存储的地方当我们在Solidity合约中使用emit关键字触发事件时,该事件会被记录在区块链的交易收据中。具体而言,事件</div> </li> <li><a href="/article/1835496149843275776.htm" title="关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript" target="_blank">关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript</a> <span class="text-muted">二挡起步</span> <a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E6%97%85%E6%B8%B8/1.htm">旅游</a><a class="tag" taget="_blank" href="/search/%E9%A3%8E%E6%99%AF/1.htm">风景</a> <div>⛵源码获取文末联系✈Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业|游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作|HTML期末大学生网页设计作业,Web大学生网页HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScrip</div> </li> <li><a href="/article/1835496148601761792.htm" title="HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动" target="_blank">HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动</a> <span class="text-muted">二挡起步</span> <a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/web%E8%AE%BE%E8%AE%A1%E7%BD%91%E9%A1%B5%E8%A7%84%E5%88%92%E4%B8%8E%E8%AE%BE%E8%AE%A1/1.htm">web设计网页规划与设计</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/dreamweaver/1.htm">dreamweaver</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作HTML期末大学生网页设计作业HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScript:做与用户的交互行为文章目录前端学习路线</div> </li> <li><a href="/article/1835448238103162880.htm" title="springboot+vue项目实战一-创建SpringBoot简单项目" target="_blank">springboot+vue项目实战一-创建SpringBoot简单项目</a> <span class="text-muted">苹果酱0567</span> <a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95%E9%A2%98%E6%B1%87%E6%80%BB%E4%B8%8E%E8%A7%A3%E6%9E%90/1.htm">面试题汇总与解析</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/boot/1.htm">boot</a><a class="tag" taget="_blank" href="/search/%E5%90%8E%E7%AB%AF/1.htm">后端</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E4%B8%AD%E9%97%B4%E4%BB%B6/1.htm">中间件</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>这段时间抽空给女朋友搭建一个个人博客,想着记录一下建站的过程,就当做笔记吧。虽然复制zjblog只要一个小时就可以搞定一个网站,或者用cms系统,三四个小时就可以做出一个前后台都有的网站,而且想做成啥样也都行。但是就是要从新做,自己做的意义不一样,更何况,俺就是专门干这个的,嘿嘿嘿要做一个网站,而且从零开始,首先呢就是技术选型了,经过一番思量决定选择-SpringBoot做后端,前端使用Vue做一</div> </li> <li><a href="/article/1835437775344726016.htm" title="博客网站制作教程" target="_blank">博客网站制作教程</a> <span class="text-muted">2401_85194651</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/maven/1.htm">maven</a> <div>首先就是技术框架:后端:Java+SpringBoot数据库:MySQL前端:Vue.js数据库连接:JPA(JavaPersistenceAPI)1.项目结构blog-app/├──backend/│├──src/main/java/com/example/blogapp/││├──BlogApplication.java││├──config/│││└──DatabaseConfig.java</div> </li> <li><a href="/article/1835428317084348416.htm" title="最简单将静态网页挂载到服务器上(不用nginx)" target="_blank">最简单将静态网页挂载到服务器上(不用nginx)</a> <span class="text-muted">全能全知者</span> <a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/%E7%AC%94%E8%AE%B0/1.htm">笔记</a> <div>最简单将静态网页挂载到服务器上(不用nginx)如果随便弄个静态网页挂在服务器都要用nignx就太麻烦了,所以直接使用Apache来搭建一些简单前端静态网页会相对方便很多检查Web服务器服务状态:sudosystemctlstatushttpd#ApacheWeb服务器如果发现没有安装web服务器:安装Apache:sudoyuminstallhttpd启动Apache:sudosystemctl</div> </li> <li><a href="/article/1835427057752961024.htm" title="补充元象二面" target="_blank">补充元象二面</a> <span class="text-muted">Redstone Monstrosity</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a> <div>1.请尽可能详细地说明,防抖和节流的区别,应用场景?你的回答中不要写出示例代码。防抖(Debounce)和节流(Throttle)是两种常用的前端性能优化技术,它们的主要区别在于如何处理高频事件的触发。以下是防抖和节流的区别和应用场景的详细说明:防抖和节流的定义防抖:在一段时间内,多次执行变为只执行最后一次。防抖的原理是,当事件被触发后,设置一个延迟定时器。如果在这个延迟时间内事件再次被触发,则重</div> </li> <li><a href="/article/1835420753252675584.htm" title="微信小程序开发注意事项" target="_blank">微信小程序开发注意事项</a> <span class="text-muted">jun778895</span> <a class="tag" taget="_blank" href="/search/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/1.htm">微信小程序</a><a class="tag" taget="_blank" href="/search/%E5%B0%8F%E7%A8%8B%E5%BA%8F/1.htm">小程序</a> <div>微信小程序开发是一个融合了前端开发、用户体验设计、后端服务(可选)以及微信小程序平台特性的综合性项目。这里,我将详细介绍一个典型的小程序开发项目的全过程,包括项目规划、设计、开发、测试及部署上线等各个环节,并尽量使内容达到或超过2000字的要求。一、项目规划1.1项目背景与目标假设我们要开发一个名为“智慧校园助手”的微信小程序,旨在为学生提供一站式校园生活服务,包括课程表查询、图书馆座位预约、食堂</div> </li> <li><a href="/article/1835411044768509952.htm" title="字节二面" target="_blank">字节二面</a> <span class="text-muted">Redstone Monstrosity</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a> <div>1.假设你是正在面试前端开发工程师的候选人,面试官让你详细说出你上一段实习过程的收获和感悟。在上一段实习过程中,我获得了宝贵的实践经验和深刻的行业洞察,以下是我的主要收获和感悟:一、专业技能提升框架应用熟练度:通过实际项目,我深入掌握了React、Vue等前端框架的使用,不仅提升了编码效率,还学会了如何根据项目需求选择合适的框架。问题解决能力:在实习期间,我遇到了许多预料之外的技术难题。通过查阅文</div> </li> <li><a href="/article/1835398064727224320.htm" title="前端代码上传文件" target="_blank">前端代码上传文件</a> <span class="text-muted">余生逆风飞翔</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>点击上传文件import{ElNotification}from'element-plus'import{API_CONFIG}from'../config/index.js'import{UploadFilled}from'@element-plus/icons-vue'import{reactive}from'vue'import{BASE_URL}from'../config/index'i</div> </li> <li><a href="/article/1835385458356482048.htm" title="uniapp实现动态标记效果详细步骤【前端开发】" target="_blank">uniapp实现动态标记效果详细步骤【前端开发】</a> <span class="text-muted">2401_85123349</span> <a class="tag" taget="_blank" href="/search/uni-app/1.htm">uni-app</a> <div>第二个点在于实现将已经被用户标记的内容在下一次获取后刷新它的状态为已标记。这是什么意思呢?比如说上面gif图中的这些人物对象,有一些已被该用户添加为关心,那么当用户下一次进入该页面时,这些已经被添加关心的对象需要以“红心”状态显现出来。这个点的难度还不算大,只需要在每一次获取后端的内容后对标记对象进行状态更新即可。II.动态标记效果实现思路和步骤首先,整体的思路是利用动态类名对不同的元素进行选择。</div> </li> <li><a href="/article/1835373236217540608.htm" title="360前端星计划-动画可以这么玩" target="_blank">360前端星计划-动画可以这么玩</a> <span class="text-muted">马小蜗</span> <div>动画的基本原理定时器改变对象的属性根据新的属性重新渲染动画functionupdate(context){//更新属性}constticker=newTicker();ticker.tick(update,context);动画的种类1、JavaScript动画操作DOMCanvas2、CSS动画transitionanimation3、SVG动画SMILJS动画的优缺点优点:灵活度、可控性、性能</div> </li> <li><a href="/article/1835368019430305792.htm" title="Vue + Express实现一个表单提交" target="_blank">Vue + Express实现一个表单提交</a> <span class="text-muted">九旬大爷的梦</span> <div>最近在折腾一个cms系统,用的vue+express,但是就一个表单提交就弄了好久,记录一下。环境:Node10+前端:Vue服务端:Express依赖包:vueexpressaxiosexpress-formidableelement-ui(可选)前言:axiosget请求参数是:paramsaxiospost请求参数是:dataexpressget接受参数是req.queryexpresspo</div> </li> <li><a href="/article/1835354447627251712.htm" title="前端知识点" target="_blank">前端知识点</a> <span class="text-muted">ZhangTao_zata</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a> <div>下面是一个最基本的html代码body{font-family:Arial,sans-serif;margin:20px;}//JavaScriptfunctionthatdisplaysanalertwhencalledfunctionshowMessage(){alert("Hello!Youclickedthebutton.");}MyFirstHTMLPageWelcometoMyPage</div> </li> <li><a href="/article/1835352325032603648.htm" title="第三十一节:Vue路由:前端路由vs后端路由的了解" target="_blank">第三十一节:Vue路由:前端路由vs后端路由的了解</a> <span class="text-muted">曹老师</span> <div>1.认识前端路由和后端路由前端路由相对于后端路由而言的,在理解前端路由之前先对于路由有一个基本的了解路由:简而言之,就是把信息从原地址传输到目的地的活动对于我们来说路由就是:根据不同的url地址展示不同的页面内容1.1后端路由以前咱们接触比较多的后端路由,当改变url地址时,浏览器会向服务器发送请求,服务器根据这个url,返回不同的资源内容后端路由的特点就是前端每次跳转到不同url地址,都会重新访</div> </li> <li><a href="/article/1835350917352878080.htm" title="华雁智科前端面试题" target="_blank">华雁智科前端面试题</a> <span class="text-muted">因为奋斗超太帅啦</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E7%AC%94%E8%AF%95%E9%9D%A2%E8%AF%95%E9%97%AE%E9%A2%98%E6%95%B4%E7%90%86/1.htm">前端笔试面试问题整理</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/ecmascript/1.htm">ecmascript</a> <div>1.var变量的提升题目:vara=1functionfun(){console.log(b)varb=2}fun()console.log(a)正确输出结果:undefined、1答错了,给一个大嘴巴子,错误答案输出结果为:2,1此题主要考察var定义的变量,作用域提升的问题,相当于varaa=1functionfun(){varbconsole.log(b)b=2}fun()console.l</div> </li> <li><a href="/article/1835350535818014720.htm" title="如何建设数据中台(五)——数据汇集—打破企业数据孤岛" target="_blank">如何建设数据中台(五)——数据汇集—打破企业数据孤岛</a> <span class="text-muted">weixin_47088026</span> <a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95%E5%92%8C%E6%80%BB%E7%BB%93/1.htm">学习记录和总结</a><a class="tag" taget="_blank" href="/search/%E4%B8%AD%E5%8F%B0/1.htm">中台</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%8F%B0/1.htm">数据中台</a><a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E4%BA%BA%E7%94%9F/1.htm">程序人生</a><a class="tag" taget="_blank" href="/search/%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB/1.htm">经验分享</a> <div>数据汇集——打破企业数据孤岛要构建企业级数据中台,第一步就是将企业内部各个业务系统的数据实现互通互联,打破数据孤岛,主要通过数据汇聚和交换来实现。企业采集的数据可以是线上采集、线下数据采集、互联网数据采集、内部数据采集等。线上数据采集主要载体分为互联网和移动互联网两种,对应有系统平台、网页、H5、小程序、App等,可以采用前端或后端埋点方式采集数据。线下数据采集主要是通过硬件来采集,例如:WiFi</div> </li> <li><a href="/article/1835343473629294592.htm" title="分布式锁和spring事务管理" target="_blank">分布式锁和spring事务管理</a> <span class="text-muted">暴躁的鱼</span> <a class="tag" taget="_blank" href="/search/%E9%94%81%E5%8F%8A%E4%BA%8B%E5%8A%A1/1.htm">锁及事务</a><a class="tag" taget="_blank" href="/search/%E5%88%86%E5%B8%83%E5%BC%8F/1.htm">分布式</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div>最近开发一个小程序遇到一个需求需要实现分布式事务管理业务需求用户在使用小程序的过程中可以查看景点,对景点地区或者城市标记是否想去,那么需要统计一个地点被标记的人数,以及记录某个用户对某个地点是否标记为想去,用两个表存储数据,一个地点表记录改地点被标记的次数,一个用户意向表记录某个用户对某个地点是否标记为想去。由于可能有多个用户同时标记一个地点,每个用户在前端点击想去按钮之后,后台接收到请求,从数据</div> </li> <li><a href="/article/1835340577596600320.htm" title="前端CSS面试常见题" target="_blank">前端CSS面试常见题</a> <span class="text-muted">剑亦未配妥</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95/1.htm">前端面试</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a> <div>边界塌陷盒模型有两种:W3C盒模型和IE盒模型,区别在于宽度是否包含边框定义:同时给兄弟/父子盒模型设置上下边距,理论上边距值是两者之和,实际上不是注意:浮动和定位不会产生边界塌陷;只有块级元素垂直方向才会产生margin合并margin计算方案margin同为正负:取绝对值大的值一正一负:求和父子元素边界塌陷解决父元素可以通过调整padding处理;设置overflowhidden,触发BFC子</div> </li> <li><a href="/article/1835331376895848448.htm" title="【JS】前端文件读取FileReader操作总结" target="_blank">【JS】前端文件读取FileReader操作总结</a> <span class="text-muted">程序员-张师傅</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>前端文件读取FileReader操作总结FileReader是JavaScript中的一个WebAPI,它允许web应用程序异步读取用户计算机上的文件(或原始数据缓冲区)的内容,例如读取文件以获取其内容,并在不将文件发送到服务器的情况下在客户端使用它。这对于处理图片、文本文件等非常有用,尤其是当你想要在用户界面中即时显示文件内容或进行文件预览时。创建FileReader对象首先,你需要创建一个Fi</div> </li> <li><a href="/article/1835331375377510400.htm" title="【前端】vue 报错:The template root requires exactly one element" target="_blank">【前端】vue 报错:The template root requires exactly one element</a> <span class="text-muted">程序员-张师傅</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/vue.js/1.htm">vue.js</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a> <div>【前端】vue报错:Thetemplaterootrequiresexactlyoneelement在Vue.js中,当你遇到错误“Thetemplaterootrequiresexactlyoneelement”时,这通常意味着你的Vue组件的模板(template)根节点不是单一的元素。Vue要求每个组件的模板必须有一个根元素来包裹所有的子元素。这个错误通常出现在以下几种情况:模板中有多个并行</div> </li> <li><a href="/article/1835302949362954240.htm" title="从单体到微服务:FastAPI ‘挂载’子应用程序的转变" target="_blank">从单体到微服务:FastAPI ‘挂载’子应用程序的转变</a> <span class="text-muted">黑金IT</span> <a class="tag" taget="_blank" href="/search/fastapi/1.htm">fastapi</a><a class="tag" taget="_blank" href="/search/%E5%BE%AE%E6%9C%8D%E5%8A%A1/1.htm">微服务</a><a class="tag" taget="_blank" href="/search/fastapi/1.htm">fastapi</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a> <div>在现代Web应用开发中,模块化架构是一种常见的设计模式,它有助于将大型应用程序分解为更小、更易于管理的部分。FastAPI,作为一个高性能的PythonWeb框架,提供了强大的支持来实现这种模块化设计。通过“挂载”子应用程序,我们可以为不同的功能区域(如前端接口、管理员接口和用户中心)创建独立的应用程序,并将它们整合到一个主应用程序中。本文将详细介绍如何在FastAPI中使用“挂载”子应用程序的方</div> </li> <li><a href="/article/1835296397365178368.htm" title="创建一个完整的购物商城系统是一个复杂的项目,涉及前端(用户界面)、后端(服务器逻辑)、数据库等多个部分。由于篇幅限制,我无法在这里提供一个完整的系统代码,但我可以分别给出一些关键部分的示例代码,涵盖几" target="_blank">创建一个完整的购物商城系统是一个复杂的项目,涉及前端(用户界面)、后端(服务器逻辑)、数据库等多个部分。由于篇幅限制,我无法在这里提供一个完整的系统代码,但我可以分别给出一些关键部分的示例代码,涵盖几</a> <span class="text-muted">uthRaman</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/ui/1.htm">ui</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a> <div>前端(HTML/CSS/JavaScript)grsyzp.cnHTML页面结构(index.html)html购物商城欢迎来到购物商城JavaScript(Ajax请求商品数据,app.js)javascriptdocument.addEventListener('DOMContentLoaded',function(){fetch('/api/products').then(response=</div> </li> <li><a href="/article/1835293121953492992.htm" title="了解 UNPKG:前端开发者的包管理利器" target="_blank">了解 UNPKG:前端开发者的包管理利器</a> <span class="text-muted">小于负无穷</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/typescript/1.htm">typescript</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/html5/1.htm">html5</a><a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a> <div>在现代前端开发中,JavaScript包管理和模块化是至关重要的,而npm则是最流行的JavaScript包管理器之一。不过,随着前端项目复杂性的增加,有时候我们希望快速引入外部依赖,而无需本地安装和构建。此时,CDN(内容分发网络)成为了一种方便快捷的解决方案,而UNPKG就是这种方式中的佼佼者。什么是UNPKG?UNPKG是一个基于npm的内容分发网络(CDN),它允许开发者直接通过URL从n</div> </li> <li><a href="/article/1835291483406692352.htm" title="前端three.js的Sprite模拟下雪动画效果" target="_blank">前端three.js的Sprite模拟下雪动画效果</a> <span class="text-muted">qq_35430208</span> <a class="tag" taget="_blank" href="/search/three.js/1.htm">three.js</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E4%B8%89%E7%BB%B4%E5%9C%BA%E6%99%AF%E4%B8%AD%E4%B8%8B%E9%9B%AA%E6%95%88%E6%9E%9C/1.htm">三维场景中下雪效果</a><a class="tag" taget="_blank" href="/search/threejs%E5%AE%9E%E7%8E%B0%E4%B8%8B%E9%9B%AA%E6%95%88%E6%9E%9C/1.htm">threejs实现下雪效果</a> <div>一、效果如图所示:二、原理同下雨一样三、完整代码:index.jsimport*asTHREEfrom'three';import{OrbitControls}from'three/addons/controls/OrbitControls.js';importmodelfrom'./model.js';//模型对象//场景constscene=newTHREE.Scene();scene.add</div> </li> <li><a href="/article/1835243206963458048.htm" title="系列3:【深入】qiankun动态与按需加载子应用—像电影一样控制出现时机" target="_blank">系列3:【深入】qiankun动态与按需加载子应用—像电影一样控制出现时机</a> <span class="text-muted">rabbit_it</span> <a class="tag" taget="_blank" href="/search/qiankun%E5%AD%A6%E4%B9%A0/1.htm">qiankun学习</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6/1.htm">前端框架</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E9%98%BF%E9%87%8C%E4%BA%91/1.htm">阿里云</a> <div>一、引言:为何需要动态加载在现代前端开发中,性能优化始终是一个关键问题。对于微前端架构而言,管理多个子应用带来了前所未有的灵活性,但也对资源的加载和使用效率提出了更高要求。假设你的微前端项目就像一场电影,而子应用是场景或演员。在不同的情节中,我们只需要特定的场景和演员出现,而不需要所有场景和演员一开始就站在舞台上等待。这时,动态加载和按需加载就成为了关键工具——让需要的内容在正确的时机上场,节省性</div> </li> <li><a href="/article/1835239047803531264.htm" title="ODOO不同版本与平台选择" target="_blank">ODOO不同版本与平台选择</a> <span class="text-muted">chouchengyin2080</span> <a class="tag" taget="_blank" href="/search/c%23/1.htm">c#</a><a class="tag" taget="_blank" href="/search/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/1.htm">操作系统</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a> <div>1.10.0vs11.0vs8.0截至2017年底,最新的ODOO发布版为ODOO11.0,但功能上有一定精简(去除财务模块,去除工作流支持),技术上变动较大(代码逐步迁移至Python3,前端框架改写得抽象)。所以如果是从生产使用的角度来讲,ODOO10.0是当前最好选择,因为其更稳定,第三方模块也更多更全面。而如果是ODOO技术爱好从业者,则逐步迁移至ODOO11.0也有必要,因为其底层技术架</div> </li> <li><a href="/article/1835221149026447360.htm" title="Nuxt Kit 自动导入功能:高效管理你的模块和组合式函数" target="_blank">Nuxt Kit 自动导入功能:高效管理你的模块和组合式函数</a> <span class="text-muted">qcidyu</span> <a class="tag" taget="_blank" href="/search/%E5%A5%BD%E7%94%A8%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86%E5%90%88/1.htm">好用的工具集合</a><a class="tag" taget="_blank" href="/search/%E4%BB%A3%E7%A0%81%E6%95%88%E7%8E%87/1.htm">代码效率</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E6%8A%80%E5%B7%A7/1.htm">前端技巧</a><a class="tag" taget="_blank" href="/search/Vue%E5%BC%80%E5%8F%91/1.htm">Vue开发</a><a class="tag" taget="_blank" href="/search/%E7%BB%84%E5%90%88%E5%BC%8F%E5%87%BD%E6%95%B0/1.htm">组合式函数</a><a class="tag" taget="_blank" href="/search/%E6%A8%A1%E5%9D%97%E7%AE%A1%E7%90%86/1.htm">模块管理</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E5%8A%A8%E5%AF%BC%E5%85%A5/1.htm">自动导入</a><a class="tag" taget="_blank" href="/search/Nuxt/1.htm">Nuxt</a><a class="tag" taget="_blank" href="/search/Kit/1.htm">Kit</a> <div>title:NuxtKit自动导入功能:高效管理你的模块和组合式函数date:2024/9/14updated:2024/9/14author:cmdragonexcerpt:通过使用NuxtKit的自动导入功能,您可以更高效地管理和使用公共函数、组合式函数和VueAPI。无论是单个导入、目录导入还是从第三方模块导入,您都可以通过简单的API调用轻松实现。categories:前端开发tags:N</div> </li> <li><a href="/article/92.htm" title="log4j对象改变日志级别" target="_blank">log4j对象改变日志级别</a> <span class="text-muted">3213213333332132</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/log4j/1.htm">log4j</a><a class="tag" taget="_blank" href="/search/level/1.htm">level</a><a class="tag" taget="_blank" href="/search/log4j%E5%AF%B9%E8%B1%A1%E5%90%8D%E7%A7%B0/1.htm">log4j对象名称</a><a class="tag" taget="_blank" href="/search/%E6%97%A5%E5%BF%97%E7%BA%A7%E5%88%AB/1.htm">日志级别</a> <div>log4j对象改变日志级别可批量的改变所有级别,或是根据条件改变日志级别。 log4j配置文件: log4j.rootLogger=ERROR,FILE,CONSOLE,EXECPTION #log4j.appender.FILE=org.apache.log4j.RollingFileAppender log4j.appender.FILE=org.apache.l</div> </li> <li><a href="/article/219.htm" title="elk+redis 搭建nginx日志分析平台" target="_blank">elk+redis 搭建nginx日志分析平台</a> <span class="text-muted">ronin47</span> <a class="tag" taget="_blank" href="/search/elasticsearch/1.htm">elasticsearch</a><a class="tag" taget="_blank" href="/search/kibana/1.htm">kibana</a><a class="tag" taget="_blank" href="/search/logstash/1.htm">logstash</a> <div>             elk+redis 搭建nginx日志分析平台 logstash,elasticsearch,kibana 怎么进行nginx的日志分析呢?首先,架构方面,nginx是有日志文件的,它的每个请求的状态等都有日志文件进行记录。其次,需要有个队 列,redis的l</div> </li> <li><a href="/article/346.htm" title="Yii2设置时区" target="_blank">Yii2设置时区</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/PHP/1.htm">PHP</a><a class="tag" taget="_blank" href="/search/timezone/1.htm">timezone</a><a class="tag" taget="_blank" href="/search/yii2/1.htm">yii2</a> <div>时区这东西,在开发的时候,你说重要吧,也还好,毕竟没它也能正常运行,你说不重要吧,那就纠结了。特别是linux系统,都TMD差上几小时,你能不痛苦吗?win还好一点。有一些常规方法,是大家目前都在采用的1、php.ini中的设置,这个就不谈了,2、程序中公用文件里设置,date_default_timezone_set一下时区3、或者。。。自己写时间处理函数,在遇到时间的时候,用这个函数处理(比较</div> </li> <li><a href="/article/473.htm" title="js实现前台动态添加文本框,后台获取文本框内容" target="_blank">js实现前台动态添加文本框,后台获取文本框内容</a> <span class="text-muted">171815164</span> <a class="tag" taget="_blank" href="/search/%E6%96%87%E6%9C%AC%E6%A1%86/1.htm">文本框</a> <div> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w</div> </li> <li><a href="/article/600.htm" title="持续集成工具" target="_blank">持续集成工具</a> <span class="text-muted">g21121</span> <a class="tag" taget="_blank" href="/search/%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90/1.htm">持续集成</a> <div>        持续集成是什么?我们为什么需要持续集成?持续集成带来的好处是什么?什么样的项目需要持续集成?...        持续集成(Continuous integration ,简称CI),所谓集成可以理解为将互相依赖的工程或模块合并成一个能单独运行</div> </li> <li><a href="/article/727.htm" title="数据结构哈希表(hash)总结" target="_blank">数据结构哈希表(hash)总结</a> <span class="text-muted">永夜-极光</span> <a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a> <div>1.什么是hash 来源于百度百科: Hash,一般翻译做“散列”,也有直接音译为“哈希”的,就是把任意长度的输入,通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,所以不可能从散列值来唯一的确定输入值。简单的说就是一种将任意长度的消息压缩到某一固定长度的消息摘要的函数。   </div> </li> <li><a href="/article/854.htm" title="乱七八糟" target="_blank">乱七八糟</a> <span class="text-muted">程序员是怎么炼成的</span> <div>eclipse中的jvm字节码查看插件地址: http://andrei.gmxhome.de/eclipse/ 安装该地址的outline 插件  后重启,打开window下的view下的bytecode视图 http://andrei.gmxhome.de/eclipse/   jvm博客: http://yunshen0909.iteye.com/blog/2</div> </li> <li><a href="/article/981.htm" title="职场人伤害了“上司” 怎样弥补" target="_blank">职场人伤害了“上司” 怎样弥补</a> <span class="text-muted">aijuans</span> <a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA/1.htm">职场</a> <div> 由于工作中的失误,或者平时不注意自己的言行“伤害”、“得罪”了自己的上司,怎么办呢?   在职业生涯中这种问题尽量不要发生。下面提供了一些解决问题的建议:   一、利用一些轻松的场合表示对他的尊重   即使是开明的上司也很注重自己的权威,都希望得到下属的尊重,所以当你与上司冲突后,最好让不愉快成为过去,你不妨在一些轻松的场合,比如会餐、联谊活动等,向上司问个好,敬下酒,表示你对对方的尊重,</div> </li> <li><a href="/article/1108.htm" title="深入浅出url编码" target="_blank">深入浅出url编码</a> <span class="text-muted">antonyup_2006</span> <a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/%E6%B5%8F%E8%A7%88%E5%99%A8/1.htm">浏览器</a><a class="tag" taget="_blank" href="/search/servlet/1.htm">servlet</a><a class="tag" taget="_blank" href="/search/weblogic/1.htm">weblogic</a><a class="tag" taget="_blank" href="/search/IE/1.htm">IE</a> <div>出处:http://blog.csdn.net/yzhz  杨争   http://blog.csdn.net/yzhz/archive/2007/07/03/1676796.aspx 一、问题:         编码问题是JAVA初学者在web开发过程中经常会遇到问题,网上也有大量相关的</div> </li> <li><a href="/article/1235.htm" title="建表后创建表的约束关系和增加表的字段" target="_blank">建表后创建表的约束关系和增加表的字段</a> <span class="text-muted">百合不是茶</span> <a class="tag" taget="_blank" href="/search/%E6%A0%87%E7%9A%84%E7%BA%A6%E6%9D%9F%E5%85%B3%E7%B3%BB/1.htm">标的约束关系</a><a class="tag" taget="_blank" href="/search/%E5%A2%9E%E5%8A%A0%E8%A1%A8%E7%9A%84%E5%AD%97%E6%AE%B5/1.htm">增加表的字段</a> <div>  下面所有的操作都是在表建立后操作的,主要目的就是熟悉sql的约束,约束语句的万能公式   1,增加字段(student表中增加 姓名字段)   alter table 增加字段的表名 add 增加的字段名 增加字段的数据类型 alter table student add name varchar2(10);   &nb</div> </li> <li><a href="/article/1362.htm" title="Uploadify 3.2 参数属性、事件、方法函数详解" target="_blank">Uploadify 3.2 参数属性、事件、方法函数详解</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/uploadify/1.htm">uploadify</a> <div>一.属性 属性名称 默认值 说明 auto true 设置为true当选择文件后就直接上传了,为false需要点击上传按钮才上传。 buttonClass ” 按钮样式 buttonCursor ‘hand’ 鼠标指针悬停在按钮上的样子 buttonImage null 浏览按钮的图片的路</div> </li> <li><a href="/article/1489.htm" title="精通Oracle10编程SQL(16)使用LOB对象" target="_blank">精通Oracle10编程SQL(16)使用LOB对象</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/plsql/1.htm">plsql</a> <div>/* *使用LOB对象 */ --LOB(Large Object)是专门用于处理大对象的一种数据类型,其所存放的数据长度可以达到4G字节 --CLOB/NCLOB用于存储大批量字符数据,BLOB用于存储大批量二进制数据,而BFILE则存储着指向OS文件的指针 /* *综合实例 */ --建立表空间 --#指定区尺寸为128k,如不指定,区尺寸默认为64k CR</div> </li> <li><a href="/article/1616.htm" title="【Resin一】Resin服务器部署web应用" target="_blank">【Resin一】Resin服务器部署web应用</a> <span class="text-muted">bit1129</span> <a class="tag" taget="_blank" href="/search/resin/1.htm">resin</a> <div>工作中,在Resin服务器上部署web应用,通常有如下三种方式:   配置多个web-app 配置多个http id 为每个应用配置一个propeties、xml以及sh脚本文件 配置多个web-app   在resin.xml中,可以为一个host配置多个web-app   <cluster id="app&q</div> </li> <li><a href="/article/1743.htm" title="red5简介及基础知识" target="_blank">red5简介及基础知识</a> <span class="text-muted">白糖_</span> <a class="tag" taget="_blank" href="/search/%E5%9F%BA%E7%A1%80/1.htm">基础</a> <div>  简介   Red5的主要功能和Macromedia公司的FMS类似,提供基于Flash的流媒体服务的一款基于Java的开源流媒体服务器。它由Java语言编写,使用RTMP作为流媒体传输协议,这与FMS完全兼容。它具有流化FLV、MP3文件,实时录制客户端流为FLV文件,共享对象,实时视频播放、Remoting等功能。用Red5替换FMS后,客户端不用更改可正</div> </li> <li><a href="/article/1870.htm" title="angular.fromJson" target="_blank">angular.fromJson</a> <span class="text-muted">boyitech</span> <a class="tag" taget="_blank" href="/search/AngularJS/1.htm">AngularJS</a><a class="tag" taget="_blank" href="/search/AngularJS+%E5%AE%98%E6%96%B9API/1.htm">AngularJS 官方API</a><a class="tag" taget="_blank" href="/search/AngularJS+API/1.htm">AngularJS API</a> <div>angular.fromJson 描述: 把Json字符串转为对象 使用方法: angular.fromJson(json); 参数详解: Param Type Details json string JSON 字符串 返回值: 对象, 数组, 字符串 或者是一个数字 示例: <!DOCTYPE HTML> <h</div> </li> <li><a href="/article/1997.htm" title="java-颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I" target="_blank">java-颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I</a> <span class="text-muted">bylijinnan</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div> public class ReverseWords { /** * 题目:颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I.词以空格分隔。 * 要求: * 1.实现速度最快,移动最少 * 2.不能使用String的方法如split,indexOf等等。 * 解答:两次翻转。 */ publ</div> </li> <li><a href="/article/2124.htm" title="web实时通讯" target="_blank">web实时通讯</a> <span class="text-muted">Chen.H</span> <a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/%E6%B5%8F%E8%A7%88%E5%99%A8/1.htm">浏览器</a><a class="tag" taget="_blank" href="/search/socket/1.htm">socket</a><a class="tag" taget="_blank" href="/search/%E8%84%9A%E6%9C%AC/1.htm">脚本</a> <div>关于web实时通讯,做一些监控软件。 由web服务器组件从消息服务器订阅实时数据,并建立消息服务器到所述web服务器之间的连接,web浏览器利用从所述web服务器下载到web页面的客户端代理与web服务器组件之间的socket连接,建立web浏览器与web服务器之间的持久连接;利用所述客户端代理与web浏览器页面之间的信息交互实现页面本地更新,建立一条从消息服务器到web浏览器页面之间的消息通路</div> </li> <li><a href="/article/2251.htm" title="[基因与生物]远古生物的基因可以嫁接到现代生物基因组中吗?" target="_blank">[基因与生物]远古生物的基因可以嫁接到现代生物基因组中吗?</a> <span class="text-muted">comsci</span> <a class="tag" taget="_blank" href="/search/%E7%94%9F%E7%89%A9/1.htm">生物</a> <div>       大家仅仅把我说的事情当作一个IT行业的笑话来听吧..没有其它更多的意思     如果我们把大自然看成是一位伟大的程序员,专门为地球上的生态系统编制基因代码,并创造出各种不同的生物来,那么6500万年前的程序员开发的代码,是否兼容现代派的程序员的代码和架构呢?   </div> </li> <li><a href="/article/2378.htm" title="oracle 外部表" target="_blank">oracle 外部表</a> <span class="text-muted">daizj</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E5%A4%96%E9%83%A8%E8%A1%A8/1.htm">外部表</a><a class="tag" taget="_blank" href="/search/external+tables/1.htm">external tables</a> <div>    oracle外部表是只允许只读访问,不能进行DML操作,不能创建索引,可以对外部表进行的查询,连接,排序,创建视图和创建同义词操作。 you can select, join, or sort external table data. You can also create views and synonyms for external tables. Ho</div> </li> <li><a href="/article/2505.htm" title="aop相关的概念及配置" target="_blank">aop相关的概念及配置</a> <span class="text-muted">daysinsun</span> <a class="tag" taget="_blank" href="/search/AOP/1.htm">AOP</a> <div>切面(Aspect): 通常在目标方法执行前后需要执行的方法(如事务、日志、权限),这些方法我们封装到一个类里面,这个类就叫切面。 连接点(joinpoint) spring里面的连接点指需要切入的方法,通常这个joinpoint可以作为一个参数传入到切面的方法里面(非常有用的一个东西)。 通知(Advice) 通知就是切面里面方法的具体实现,分为前置、后置、最终、异常环</div> </li> <li><a href="/article/2632.htm" title="初一上学期难记忆单词背诵第二课" target="_blank">初一上学期难记忆单词背诵第二课</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/english/1.htm">english</a><a class="tag" taget="_blank" href="/search/word/1.htm">word</a> <div>middle 中间的,中级的 well 喔,那么;好吧 phone 电话,电话机 policeman 警察 ask 问 take 拿到;带到 address 地址 glad 高兴的,乐意的 why 为什么  China 中国 family 家庭 grandmother (外)祖母 grandfather (外)祖父 wife 妻子 husband 丈夫 da</div> </li> <li><a href="/article/2759.htm" title="Linux日志分析常用命令" target="_blank">Linux日志分析常用命令</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/log/1.htm">log</a> <div>1.查看文件内容 cat -n 显示行号 2.分页显示 more Enter 显示下一行 空格 显示下一页 F 显示下一屏 B 显示上一屏 less /get 查询"get"字符串并高亮显示 3.显示文件尾 tail -f 不退出持续显示 -n 显示文件最后n行 4.显示头文件 head -n 显示文件开始n行 5.内容排序 sort -n 按照</div> </li> <li><a href="/article/2886.htm" title="JSONP 原理分析" target="_blank">JSONP 原理分析</a> <span class="text-muted">fantasy2005</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/jsonp/1.htm">jsonp</a><a class="tag" taget="_blank" href="/search/jsonp+%E8%B7%A8%E5%9F%9F/1.htm">jsonp 跨域</a> <div>转自 http://www.nowamagic.net/librarys/veda/detail/224 JavaScript是一种在Web开发中经常使用的前端动态脚本技术。在JavaScript中,有一个很重要的安全性限制,被称为“Same-Origin Policy”(同源策略)。这一策略对于JavaScript代码能够访问的页面内容做了很重要的限制,即JavaScript只能访问与包含它的</div> </li> <li><a href="/article/3013.htm" title="使用connect by进行级联查询" target="_blank">使用connect by进行级联查询</a> <span class="text-muted">234390216</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%9F%A5%E8%AF%A2/1.htm">查询</a><a class="tag" taget="_blank" href="/search/%E7%88%B6%E5%AD%90/1.htm">父子</a><a class="tag" taget="_blank" href="/search/Connect+by/1.htm">Connect by</a><a class="tag" taget="_blank" href="/search/%E7%BA%A7%E8%81%94/1.htm">级联</a> <div>使用connect by进行级联查询          connect by可以用于级联查询,常用于对具有树状结构的记录查询某一节点的所有子孙节点或所有祖辈节点。          来看一个示例,现假设我们拥有一个菜单表t_menu,其中只有三个字段:</div> </li> <li><a href="/article/3140.htm" title="一个不错的能将HTML表格导出为excel,pdf等的jquery插件" target="_blank">一个不错的能将HTML表格导出为excel,pdf等的jquery插件</a> <span class="text-muted">jackyrong</span> <a class="tag" taget="_blank" href="/search/jquery%E6%8F%92%E4%BB%B6/1.htm">jquery插件</a> <div>发现一个老外写的不错的jquery插件,可以实现将HTML 表格导出为excel,pdf等格式, 地址在: https://github.com/kayalshri/ 下面看个例子,实现导出表格到excel,pdf <html> <head> <title>Export html table to excel an</div> </li> <li><a href="/article/3267.htm" title="UI设计中我们为什么需要设计动效" target="_blank">UI设计中我们为什么需要设计动效</a> <span class="text-muted">lampcy</span> <a class="tag" taget="_blank" href="/search/UI/1.htm">UI</a><a class="tag" taget="_blank" href="/search/UI%E8%AE%BE%E8%AE%A1/1.htm">UI设计</a> <div>关于Unity3D中的Shader的知识 首先先解释下Unity3D的Shader,Unity里面的Shaders是使用一种叫ShaderLab的语言编写的,它同微软的FX文件或者NVIDIA的CgFX有些类似。传统意义上的vertex shader和pixel shader还是使用标准的Cg/HLSL 编程语言编写的。因此Unity文档里面的Shader,都是指用ShaderLab编写的代码,</div> </li> <li><a href="/article/3394.htm" title="如何禁止页面缓存" target="_blank">如何禁止页面缓存</a> <span class="text-muted">nannan408</span> <a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/jsp/1.htm">jsp</a><a class="tag" taget="_blank" href="/search/cache/1.htm">cache</a> <div>禁止页面使用缓存~ ------------------------------------------------ jsp:页面no cache: response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cach</div> </li> <li><a href="/article/3521.htm" title="以代码的方式管理quartz定时任务的暂停、重启、删除、添加等" target="_blank">以代码的方式管理quartz定时任务的暂停、重启、删除、添加等</a> <span class="text-muted">Everyday都不同</span> <a class="tag" taget="_blank" href="/search/%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1%E7%AE%A1%E7%90%86/1.htm">定时任务管理</a><a class="tag" taget="_blank" href="/search/spring-quartz/1.htm">spring-quartz</a> <div>      【前言】在项目的管理功能中,对定时任务的管理有时会很常见。因为我们不能指望只在配置文件中配置好定时任务就行了,因为如果要控制定时任务的 “暂停” 呢?暂停之后又要在某个时间点 “重启” 该定时任务呢?或者说直接 “删除” 该定时任务呢?要改变某定时任务的触发时间呢? “添加” 一个定时任务对于系统的使用者而言,是不太现实的,因为一个定时任务的处理逻辑他是不</div> </li> <li><a href="/article/3648.htm" title="EXT实例" target="_blank">EXT实例</a> <span class="text-muted">tntxia</span> <a class="tag" taget="_blank" href="/search/ext/1.htm">ext</a> <div>  (1) 增加一个按钮   JSP:   <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); Stri</div> </li> <li><a href="/article/3775.htm" title="数学学习在计算机研究领域的作用和重要性" target="_blank">数学学习在计算机研究领域的作用和重要性</a> <span class="text-muted">xjnine</span> <a class="tag" taget="_blank" href="/search/Math/1.htm">Math</a> <div>最近一直有师弟师妹和朋友问我数学和研究的关系,研一要去学什么数学课。毕竟在清华,衡量一个研究生最重要的指标之一就是paper,而没有数学,是肯定上不了世界顶级的期刊和会议的,这在计算机学界尤其重要!你会发现,不论哪个领域有价值的东西,都一定离不开数学!在这样一个信息时代,当google已经让世界没有秘密的时候,一种卓越的数学思维,绝对可以成为你的核心竞争力.  无奈本人实在见地</div> </li> </ul> </div> </div> </div> <div> <div class="container"> <div class="indexes"> <strong>按字母分类:</strong> <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a> </div> </div> </div> <footer id="footer" class="mb30 mt30"> <div class="container"> <div class="footBglm"> <a target="_blank" href="/">首页</a> - <a target="_blank" href="/custom/about.htm">关于我们</a> - <a target="_blank" href="/search/Java/1.htm">站内搜索</a> - <a target="_blank" href="/sitemap.txt">Sitemap</a> - <a target="_blank" href="/custom/delete.htm">侵权投诉</a> </div> <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved. <!-- <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>--> </div> </div> </footer> <!-- 代码高亮 --> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script> <link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/> <script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script> </body> </html>